2.3. The layout of installed files

This section describes what files get installed where. You don't need to know it if you are simply installing GHC, but it is vital information if you are changing the implementation.

GHC is installed in two directory trees:

Binary directory

known as $(bindir), holds executables that the user is expected to invoke. Notably, ghc and ghci. On Unix, this directory is typically something like /usr/local/bin. On Windows, however, this directory is always $(libdir)/bin.

Library directory,

known as $(libdir), holds all the support files needed to run GHC. On Unix, this directory is usually something like /usr/lib/ghc/ghc-5.02.

When GHC runs, it must know where its library directory is. It finds this out in one of two ways:

2.3.1. Layout of the library directory

The layout of the library directory is almost identical on Windows and Unix, as follows: layout:

  $(libdir)/
    package.conf           GHC package configuration
    ghc-usage.txt          Message displayed by ghc ––help
    
    bin/                   [Win32 only]  User-visible binaries
         ghc.exe
         ghci.bat

    unlit                  Remove literate markup
    
    touchy.exe             [Win32 only]
    perl.exe               [Win32 only]
    gcc.exe                [Win32 only]
   
    ghc-x.xx               GHC executable [Unix only]
   
    ghc-split              Asm code splitter
    ghc-asm	           Asm code mangler

    gcc-lib/               [Win32 only] Support files for gcc
        specs              gcc configuration
 
        cpp0.exe           gcc support binaries
        as.exe
        ld.exe

        crt0.o              Standard
	   ..etc..	    binaries
        
        libmingw32.a        Standard
	   ..etc..	    libraries

        *.h                 Include files

    imports/                GHC interface files
        std/*.hi              'std' library
	lang/*.hi             'lang' library
        ..etc..

    include/                 C header files
        StgMacros.h           GHC-specific
        ..etc...              header files

        mingw/*.h            [Win32 only] Mingwin header files

    libHSrts.a              GHC library archives
    libHSstd.a
    libHSlang.a
      ..etc..

    HSstd1.o                GHC library linkables
    HSstd2.o                  (used by ghci, which does
    HSlang.o                  not grok .a files yet)

Note that: