Name: Anonymous 2016-10-04 22:08
Is the most important part of a compiler the lexer, or the parser?
The result is often thousands of needless lines of code passing through the lexical analyzer, which is (in good compilers) the most expensive phase.
thousands of needless linesCan't you write a lexer for a C-ish language in less than, say, 500 lines of C?
So 300 lines of Perl worth 1700 lines of Haskell and 30.000 lines of C?
Core is a very small, explicitly-typed, variant of System F. The exact variant is called System FC, which embodies equality constraints and coercions.
Before code generation, GHC converts the Core-language program into StgSynhttps://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/StgSynType
Types have largely been discarded, retaining only enough type information as is needed to guide code generation
c4.c:76:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
./a.out hello.c
Segmentation fault