Glasgow Haskell Compiler: Porovnání verzí

Smazaný obsah Přidaný obsah
m oprava odkazu en, +oldid
pokračování překladu
Řádek 15:
 
==Historie==
vývoj GHC originallypůvodně startedzapočal inv roce 1989 asjako a prototype,prototyp writtennapsaný inv [[Lazy ML|LML (Lazy ML)]] byKevinem KevinHammondem Hammond at thena [[University ofUniversita Glasgow]]. LaterPozději thatv year,tomto roce thebyl prototypetento wasprototyp completelykompletně rewrittenpřepsán inv HaskellHaskellu, exceptkromě for itsjeho [[parser|parseru]], byCordeliusem Cordelia HallHallem, WillWillem Partain,Partainem and Simona Simonem PeytonPeytonem JonesJonesem. ItsJeho firstprvní beta releaseverza wasbyla on Aprilvdána 1,. dubna v roce 1991 anda subsequentnásledovali releasesdalší addedrozšiřující averze, přidávající např. [[StrictnessAnalýza analysisstriktnosti|strictnessanalýzu analyzerstriktnosti]] asstejně welljako asjazyková language extensions suchrozšíření, asjako [[MonadsMonady inve functionalfunkcionálním programmingprokramování|monadicmonadický I/O]], mutableproměnlivá arrayspole, unboxed datadatové types, andtypy a [[PerformanceVýkonová analysisanalýza|profiler]].<ref name="history">{{cite conference
Peyton Jones, stejně jako Simon Marlow, později přešli k [[Microsoft Research]] v [[Cambridge (Anglie)|Cambridge]] v Anglii, kde byli hlavními osobami, které byli zodpovědné za vývoj GHC. GHC také obsahovalo programový kód od dalších šedesáti programátorů, kteří se spolupodíleli na jeho vývoji.
| first = P.
| last = Hudak
| coauthors = Hughes, J.; Peyton Jones, S.; Wadler, P.
| title = A history of Haskell: being lazy with class
| booktitle = Proc. Third ACM SIGPLAN History of Programming Languages Conference (HOPL-III)
| month = June | year = 2007
| url = http://research.microsoft.com/~simonpj/papers/history-of-haskell/index.htm
}}</ref>
 
Peyton Jones, as well as Simon Marlow, later moved to [[Microsoft Research]] in [[Cambridge, England]], where they continue to be primarily responsible for developing GHC. GHC also contains code from more than sixty other contributors. <ref name="contribs">{{cite web
| title = The GHC Team
| url=http://cvs.haskell.org/trac/ghc/wiki/Contributors
| accessdate=2007-01-28
}}</ref>
 
==Architektura==
GHC isje itselfnapsáno writtenv in HaskellHaskellu (intechnikou azvanou technique known asjako [[BootstrappingStrojové (compilers)|bootstrappingučení]]), but theale runtime system forsystém HaskellHaskellu, anzákladní essentialprvek partkompilátoru ofje thenapsána compiler, is written inv [[The C (programmingProgramming language)Language|programovacím jazyce C]] anda zprostředkovaném jazyce [[C-- (intermediate language)|C--]]. MuchMnoho ofz kódu GHC isje writtennapsáno in thepomocí [[literate programming|písmenného programování]] style.
 
GHC's [[frontFront end]] GHCincorporating thezahrnující [[lexerLexikální analýza|exikální analýzu]], parser and [[TypeSyntaktická systemanalýza|syntaktickou analýzu]] a [[typechecker]] — isje designednavržen topro preservezachování asco muchnejvyššího informationmnožství aboutinfrormace theo sourcezdrojovém languagekódu as possibledo untildokončení afterprocesu [[type inference]] iss complete,důrazem towardna theposkytování goaljasných ofvýpisů providingchybových clearstavů error messages to usersuživateli.<ref name="history"/> In its last phase, the front end [[Syntactic sugar|desugars]] Haskell into a typed [[intermediate language]] known as "Core" (based on [[System F]], extended with <code>let</code> and <code>case</code> expressions). Recently, Core was extended to support [[generalized algebraic datatypes]] in its [[type system]], and is now based on an extension to System F known as System FC.
 
In the tradition of type-directed compilation, GHC's simplifier, or "middle end", where most of the [[Compiler optimization|optimizations]] implemented in GHC are performed, is structured as a series of [[Source code|source-to-source]] [[Program transformation|transformations]] on Core code. The analyses and transformations performed in this compiler stage include demand analysis (a generalization of [[strictness analysis]]), application of user-defined [[rewrite rules]] (including a set of rules included in GHC's standard libraries that performs foldr/build [[Deforestation (computer science)|fusion]]), unfolding (called "[[inlining]]" in more traditional compilers), [[let-floating]], an analysis that determines which function arguments can be unboxed, [[constructed product result analysis]], [[Partial evaluation|specialization]] of [[Type class|overloaded]] functions, as well as a set of simpler local transformations such as [[constant folding]] and [[beta reduction]].