Tobias Gedell <d99getob@dtek.chalmers.se> writes:
GHC is such a program, as are the other Haskell compilers. Perhaps too complicated for your purposes, though.
GHC has too many mutually recursive modules to be useful, otherwise it would be great! But I will look more into the other compilers, are they written in Haskell?, thanks for the suggestion!
nhc98comp (compiler proper, excluding driver scripts, prelude, etc.) is written in almost pure Haskell'98, and seems to be about 27,000 lines these days. Of that, ~4000 lines are completely blank, and I don't know how to count the comment lines, but there are certainly more than ~3000. I can also give you a single (machine-generated) module that is 27,000 lines on its own! It is the tracing version of the standard Prelude, transformed from the ordinary published definition by Hat. Regards, Malcolm