
The Glorious Glasgow Haskell Compilation System User's Guide, Version 6.4.2 The GHC Team The Glorious Glasgow Haskell Compilation System User's Guide, Version 6.4.2 The GHC Team Table of Contents The Glasgow Haskell Compiler License .......................................................................................... x 1. Introduction to GHC ................................................................................................................. 1 1.1. Meta-information: Web sites, mailing lists, etc. ................................................................... 1 1.2. Reporting bugs in GHC .................................................................................................. 3 1.2.1. How do I tell if I should report my bug? .................................................................. 3 1.2.2. What to put in a bug report ................................................................................... 3 1.3. GHC version numbering policy ........................................................................................ 3 1.4. Release notes for version 6.4.2 ......................................................................................... 4 1.5. Release notes for version 6.4.1 ......................................................................................... 5 1.6. Release notes for version 6.4 ........................................................................................... 6 1.6.1. User-visible compiler changes ............................................................................... 6 1.6.2. User-visible interpreter (GHCi) changes .................................................................. 8 1.6.3. User-visible library changes .................................................................................. 9 1.6.4. Experimental features ........................................................................................ 10 1.6.5. Internal changes ............................................................................................... 10 2. Installing GHC ...................................................................................................................... 12 2.1. Installing on Unix-a-likes .............................................................................................. 12 2.1.1. When a platform-specific package is available ........................................................ 12 2.1.2. GHC binary distributions ................................................................................... 12 2.1.2.1. Installing .............................................................................................. 13 2.1.2.2. What bundles there are ............................................................................ 14 2.1.2.3. Testing that GHC seems to be working ....................................................... 15 2.2. Installing on Windows ................................................................................................. 15 2.2.1. Installing GHC on Windows ............................................................................... 15 2.2.2. Moving GHC around ......................................................................................... 16 2.2.3. Installing ghc-win32 FAQ .................................................................................. 16 2.3. The layout of installed files ........................................................................................... 17 2.3.1. The binary directory .......................................................................................... 17 2.3.2. The library directory .......................................................................................... 17 3. Using GHCi .......................................................................................................................... 20 3.1. Introduction to GHCi ................................................................................................... 20 3.2. Loading source files ..................................................................................................... 21 3.2.1. Modules vs. filenames ....................................................................................... 22 3.2.2. Making changes and recompilation ...................................................................... 22 3.3. Loading compiled code ................................................................................................ 22 3.4. Interactive evaluation at the prompt ................................................................................ 24 3.4.1. What's really in scope at the prompt? .................................................................... 25 3.4.1.1. Qualified names ..................................................................................... 26 3.4.2. Using do-notation at the prompt ......................................................................... 26 3.4.3. The it variable ................................................................................................ 27 3.4.4. Type defaulting in GHCi .................................................................................... 28 3.5. Invoking GHCi ........................................................................................................... 28 3.5.1. Packages ......................................................................................................... 28 3.5.2. Extra libraries .................................................................................................. 29 3.6. GHCi commands ......................................................................................................... 29 3.7. The :set command .................................................................................................... 32 3.7.1. GHCi options ................................................................................................... 32 3.7.2. Setting GHC command-line options in GHCi ......................................................... 32 3.8. The .ghci file ........................................................................................................... 33 3.9. FAQ and Things To Watch Out For ................................................................................ 33 4. Using GHC ........................................................................................................................... 35 4.1. Options overview ........................................................................................................ 35 4.1.1. command-line arguments ................................................................................... 35 iv The Glorious Glasgow Haskell Com- pilation System User's Guide, Version 4.1.2. command line options in source files .................................................................... 35 4.1.3. Setting options in GHCi ..................................................................................... 35 4.2. Static vs. Dynamic options ............................................................................................ 36 4.3. Meaningful file suffixes ................................................................................................ 36 4.4. Modes of operation ...................................................................................................... 36 4.4.1. Using ghc ––make ........................................................................................... 37 4.4.2. Expression evaluation mode ................................................................................ 37 4.4.3. Batch compiler mode ......................................................................................... 38 4.5. Help and verbosity options ............................................................................................ 38 4.6. Filenames and separate compilation ................................................................................ 40 4.6.1. Haskell source files ........................................................................................... 40 4.6.2. Output files ...................................................................................................... 40 4.6.3. The search path ................................................................................................ 41 4.6.4. Redirecting the compilation output(s) ................................................................... 42 4.6.5. Keeping Intermediate Files ................................................................................. 43 4.6.6. Redirecting temporary files ................................................................................. 43 4.6.7. Other options related to interface files ................................................................... 43 4.6.8. The recompilation checker .................................................................................. 44 4.6.9. How to compile mutually recursive modules .......................................................... 44 4.6.10. Using make ................................................................................................... 46 4.6.11. Dependency generation .................................................................................... 48 4.6.12. Orphan modules and instance declarations ........................................................... 49 4.7. Warnings and sanity-checking ....................................................................................... 50
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages230 Page
-
File Size-