index
Welcome to the GHC Users Guide
Contents:
- 1. The Glasgow Haskell Compiler License
- 2. Introduction to GHC
- 3. Release notes for version 8.0.1
-
4. Using GHCi
- 4.1. Introduction to GHCi
- 4.2. Loading source files
- 4.3. Loading compiled code
-
4.4. Interactive evaluation at the prompt
- 4.4.1. I/O actions at the prompt
- 4.4.2. Using
do
notation at the prompt - 4.4.3. Multiline input
- 4.4.4. Type, class and other declarations
- 4.4.5. What’s really in scope at the prompt?
- 4.4.6. The
:main
and:run
commands - 4.4.7. The
it
variable - 4.4.8. Type defaulting in GHCi
- 4.4.9. Using a custom interactive printing function
- 4.4.10. Stack Traces in GHCi
- 4.5. The GHCi Debugger
- 4.6. Invoking GHCi
- 4.7. GHCi commands
-
4.8. The
:set
and:seti
commands -
4.9. The
.ghci
and.haskeline
files - 4.10. Compiling to object code inside GHCi
- 4.11. Running the interpreter in a separate process
- 4.12. FAQ and Things To Watch Out For
- 5. Using runghc
-
6. Using GHC
- 6.1. Using GHC
- 6.2. Warnings and sanity-checking
- 6.3. Optimisation (code improvement)
- 6.4. Using Concurrent Haskell
- 6.5. Using SMP parallelism
-
6.6. Flag reference
- 6.6.1. Verbosity options
- 6.6.2. Alternative modes of operation
- 6.6.3. Which phases to run
- 6.6.4. Redirecting output
- 6.6.5. Keeping intermediate files
- 6.6.6. Temporary files
- 6.6.7. Finding imports
- 6.6.8. Interface file options
- 6.6.9. Recompilation checking
- 6.6.10. Interactive-mode options
- 6.6.11. Packages
- 6.6.12. Language options
- 6.6.13. Warnings
- 6.6.14. Optimisation levels
- 6.6.15. Individual optimisations
- 6.6.16. Profiling options
- 6.6.17. Program coverage options
- 6.6.18. C pre-processor options
- 6.6.19. Code generation options
- 6.6.20. Linking options
- 6.6.21. Plugin options
- 6.6.22. Replacing phases
- 6.6.23. Forcing options to particular phases
- 6.6.24. Platform-specific options
- 6.6.25. Compiler debugging options
- 6.6.26. Miscellaneous compiler options
-
6.7. Running a compiled program
- 6.7.1. Setting RTS options
- 6.7.2. Miscellaneous RTS options
- 6.7.3. RTS options to control the garbage collector
- 6.7.4. RTS options to produce runtime statistics
- 6.7.5. RTS options for concurrency and parallelism
- 6.7.6. RTS options for profiling
- 6.7.7. Tracing
- 6.7.8. RTS options for hackers, debuggers, and over-interested souls
- 6.7.9. Getting information about the RTS
-
6.8. Filenames and separate compilation
- 6.8.1. Haskell source files
- 6.8.2. Output files
- 6.8.3. The search path
- 6.8.4. Redirecting the compilation output(s)
- 6.8.5. Keeping Intermediate Files
- 6.8.6. Redirecting temporary files
- 6.8.7. Other options related to interface files
- 6.8.8. The recompilation checker
- 6.8.9. How to compile mutually recursive modules
- 6.8.10. Module signatures
- 6.8.11. Using
make
- 6.8.12. Dependency generation
- 6.8.13. Orphan modules and instance declarations
-
6.9. Packages
- 6.9.1. Using Packages
- 6.9.2. The
main
package - 6.9.3. Consequences of packages for the Haskell language
- 6.9.4. Thinning and renaming modules
- 6.9.5. Package Databases
- 6.9.6. Installed package IDs, dependencies, and broken packages
- 6.9.7. Package management (the
ghc-pkg
command) - 6.9.8. Building a package from Haskell source
- 6.9.9.
InstalledPackageInfo
: a package specification - 6.9.10. Package environments
- 6.10. GHC Backends
- 6.11. Options related to a particular phase
- 6.12. Using shared libraries
- 6.13. Debugging the compiler
-
7. Profiling
- 7.1. Cost centres and cost-centre stacks
- 7.2. Compiler options for profiling
- 7.3. Time and allocation profiling
- 7.4. Profiling memory usage
-
7.5.
hp2ps
– Rendering heap profiles to PostScript - 7.6. Profiling Parallel and Concurrent Programs
- 7.7. Observing Code Coverage
- 7.8. Using “ticky-ticky” profiling (for implementors)
- 8. Advice on: sooner, faster, smaller, thriftier
-
9. GHC Language Features
- 9.1. Language options
- 9.2. Unboxed types and primitive operations
-
9.3. Syntactic extensions
- 9.3.1. Unicode syntax
- 9.3.2. The magic hash
- 9.3.3. Negative literals
- 9.3.4. Fractional looking integer literals
- 9.3.5. Binary integer literals
- 9.3.6. Pattern guards
- 9.3.7. View patterns
- 9.3.8. n+k patterns
- 9.3.9. The recursive do-notation
- 9.3.10. Applicative do-notation
- 9.3.11. Parallel List Comprehensions
- 9.3.12. Generalised (SQL-like) List Comprehensions
- 9.3.13. Monad comprehensions
- 9.3.14. New monadic failure desugaring mechanism
- 9.3.15. Rebindable syntax and the implicit Prelude import
- 9.3.16. Postfix operators
- 9.3.17. Tuple sections
- 9.3.18. Lambda-case
- 9.3.19. Empty case alternatives
- 9.3.20. Multi-way if-expressions
- 9.3.21. Local Fixity Declarations
- 9.3.22. Import and export extensions
- 9.3.23. Summary of stolen syntax
-
9.4. Extensions to data types and type synonyms
- 9.4.1. Data types with no constructors
- 9.4.2. Data type contexts
- 9.4.3. Infix type constructors, classes, and type variables
- 9.4.4. Type operators
- 9.4.5. Liberalised type synonyms
- 9.4.6. Existentially quantified data constructors
- 9.4.7. Declaring data types with explicit constructor signatures
- 9.4.8. Generalised Algebraic Data Types (GADTs)
- 9.5. Extensions to the record system
-
9.6. Extensions to the “deriving” mechanism
- 9.6.1. Inferred context for deriving clauses
- 9.6.2. Stand-alone deriving declarations
- 9.6.3. Deriving instances of extra classes (
Data
, etc.) - 9.6.4. Deriving
Functor
instances - 9.6.5. Deriving
Foldable
instances - 9.6.6. Deriving
Traversable
instances - 9.6.7. Deriving
Typeable
instances - 9.6.8. Deriving
Lift
instances - 9.6.9. Generalised derived instances for newtypes
- 9.6.10. Deriving any other class
- 9.7. Pattern synonyms
- 9.8. Class and instances declarations
- 9.9. Type families
- 9.10. Datatype promotion
-
9.11. Kind polymorphism and Type-in-Type
- 9.11.1. The difference between
-XTypeInType
and-XPolyKinds
- 9.11.2. Overview of kind polymorphism
- 9.11.3. Overview of Type-in-Type
- 9.11.4. Principles of kind inference
- 9.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 9.11.6. Kind inference in closed type families
- 9.11.7. Kind inference in class instance declarations
- 9.11.8. Kind inference in type signatures
- 9.11.9. Explicit kind quantification
- 9.11.10. Kind-indexed GADTs
- 9.11.11. Constraints in kinds
- 9.11.12. The kind
*
- 9.11.13. Inferring dependency in datatype declarations
- 9.11.14. Kind defaulting without
-XPolyKinds
- 9.11.15. Pretty-printing in the presence of kind polymorphism
- 9.11.1. The difference between
- 9.12. Runtime representation polymorphism
- 9.13. Type-Level Literals
- 9.14. Constraints in types
- 9.15. Extensions to type signatures
- 9.16. Lexically scoped type variables
- 9.17. Bindings and generalisation
- 9.18. Visible type application
- 9.19. Implicit parameters
- 9.20. Arbitrary-rank polymorphism
- 9.21. Impredicative polymorphism
- 9.22. Typed Holes
- 9.23. Partial Type Signatures
- 9.24. Custom compile-time errors
- 9.25. Deferring type errors to runtime
- 9.26. Template Haskell
- 9.27. Arrow notation
- 9.28. Bang patterns and Strict Haskell
- 9.29. Assertions
- 9.30. Static pointers
-
9.31. Pragmas
- 9.31.1. LANGUAGE pragma
- 9.31.2.
OPTIONS_GHC
pragma - 9.31.3.
INCLUDE
pragma - 9.31.4.
WARNING
andDEPRECATED
pragmas - 9.31.5. MINIMAL pragma
- 9.31.6. INLINE and NOINLINE pragmas
- 9.31.7.
LINE
pragma - 9.31.8.
RULES
pragma -
9.31.9.
SPECIALIZE
pragma - 9.31.10.
SPECIALIZE
instance pragma - 9.31.11.
UNPACK
pragma - 9.31.12.
NOUNPACK
pragma - 9.31.13.
SOURCE
pragma - 9.31.14.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 9.32. Rewrite rules
- 9.33. Special built-in functions
- 9.34. Generic classes
- 9.35. Generic programming
- 9.36. Roles
- 9.37. HasCallStack
- 9.38. Concurrent and Parallel Haskell
- 9.39. Safe Haskell
- 10. Foreign function interface (FFI)
- 11. Extending and using GHC as a Library
- 12. What to do when something goes wrong
- 13. Debugging compiled programs
- 14. Other Haskell utility programs
- 15. Running GHC on Win32 systems
- 16. Known bugs and infelicities
- 17. Care and feeding of your GHC Users Guide
© 2002–2007 The University Court of the University of Glasgow. All rights reserved.
Licensed under the Glasgow Haskell Compiler License.
https://downloads.haskell.org/~ghc/8.0.1/docs/html/users_guide/index.html