GHC Libraries

Haskell libraries converted to external Core representation from GHC version 7.0.3.


A copy of Haskell libraries from GHC, which are converted to external Core representation (.hcr file extension). These are used to generate .hcj files for the haskell-python project <>.

Steps to create hcr files for GHC libraries

Warning: doesn't work yet

  1. Set up system for building GHC
  2. Get GHC sources
  3. If your using sources from git checkout/clone, run "perl boot".
  4. Install extcore package
  5. Copy 'mk/' to 'mk/'.
  6. Use "BuildFlavour = quick" and add "-fext-core' to GhcLibHcOpts option in mk/
  7. Run "autoreconf"
  8. Run "./configure"
  9. Run "make"

Command line to build some GHC library files

ghc -fext-core -Wall -fno-warn-name-shadowing -fno-warn-orphans -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XRank2Types -XScopedTypeVariables -XDeriveDataTypeable -XFlexibleInstances <file>


These files are copied from GHC repository, and each subfolder may contain a LICENSE file specifying its license. Otherwise the files are under the GHC license, see the LICENSE file.