GHC ユーザーズガイドにようこそ¶
目次:
- 1. The Glasgow Haskell Compiler License
- 2. GHC の紹介
- 3. バージョン 8.4.1 のリリースノート
- 4. Release notes for version 8.4.2
- 5. Release notes for version 8.4.3
- 6. Using GHCi
- 6.1. Introduction to GHCi
- 6.2. Loading source files
- 6.3. Loading compiled code
- 6.4. Interactive evaluation at the prompt
- 6.4.1. I/O actions at the prompt
- 6.4.2. Using
do
notation at the prompt - 6.4.3. Multiline input
- 6.4.4. Type, class and other declarations
- 6.4.5. What's really in scope at the prompt?
- 6.4.6. The
:main
and:run
commands - 6.4.7. The
it
variable - 6.4.8. Type defaulting in GHCi
- 6.4.9. Using a custom interactive printing function
- 6.4.10. Stack Traces in GHCi
- 6.5. The GHCi Debugger
- 6.6. Invoking GHCi
- 6.7. GHCi commands
- 6.8. The
:set
and:seti
commands - 6.9. The
.ghci
and.haskeline
files - 6.10. Compiling to object code inside GHCi
- 6.11. Running the interpreter in a separate process
- 6.12. FAQ and Things To Watch Out For
- 7. Using runghc
- 8. Using GHC
- 8.1. Using GHC
- 8.2. Warnings and sanity-checking
- 8.3. Optimisation (code improvement)
- 8.4. Using Concurrent Haskell
- 8.5. Using SMP parallelism
- 8.6. Flag reference
- 8.6.1. Verbosity options
- 8.6.2. Alternative modes of operation
- 8.6.3. Which phases to run
- 8.6.4. Redirecting output
- 8.6.5. Keeping intermediate files
- 8.6.6. Temporary files
- 8.6.7. Finding imports
- 8.6.8. Interface file options
- 8.6.9. Recompilation checking
- 8.6.10. Interactive-mode options
- 8.6.11. Packages
- 8.6.12. Language options
- 8.6.13. Warnings
- 8.6.14. Optimisation levels
- 8.6.15. Individual optimisations
- 8.6.16. Profiling options
- 8.6.17. Program coverage options
- 8.6.18. C pre-processor options
- 8.6.19. Code generation options
- 8.6.20. Linking options
- 8.6.21. Plugin options
- 8.6.22. Replacing phases
- 8.6.23. Forcing options to particular phases
- 8.6.24. Platform-specific options
- 8.6.25. Compiler debugging options
- 8.6.26. Miscellaneous compiler options
- 8.7. Running a compiled program
- 8.7.1. Setting RTS options
- 8.7.2. Miscellaneous RTS options
- 8.7.3. RTS options to control the garbage collector
- 8.7.4. RTS options to produce runtime statistics
- 8.7.5. RTS options for concurrency and parallelism
- 8.7.6. RTS options for profiling
- 8.7.7. Tracing
- 8.7.8. RTS options for hackers, debuggers, and over-interested souls
- 8.7.9. Getting information about the RTS
- 8.8. Filenames and separate compilation
- 8.8.1. Haskell source files
- 8.8.2. Output files
- 8.8.3. The search path
- 8.8.4. Redirecting the compilation output(s)
- 8.8.5. Keeping Intermediate Files
- 8.8.6. Redirecting temporary files
- 8.8.7. Other options related to interface files
- 8.8.8. The recompilation checker
- 8.8.9. How to compile mutually recursive modules
- 8.8.10. Module signatures
- 8.8.11. Using
make
- 8.8.12. Dependency generation
- 8.8.13. Orphan modules and instance declarations
- 8.9. Packages
- 8.9.1. Using Packages
- 8.9.2. The
main
package - 8.9.3. Consequences of packages for the Haskell language
- 8.9.4. Thinning and renaming modules
- 8.9.5. Package Databases
- 8.9.6. Installed package IDs, dependencies, and broken packages
- 8.9.7. Package management (the
ghc-pkg
command) - 8.9.8. Building a package from Haskell source
- 8.9.9.
InstalledPackageInfo
: a package specification
- 8.10. GHC Backends
- 8.11. Options related to a particular phase
- 8.12. Using shared libraries
- 8.13. Debugging the compiler
- 9. Profiling
- 9.1. Cost centres and cost-centre stacks
- 9.2. Compiler options for profiling
- 9.3. Time and allocation profiling
- 9.4. Profiling memory usage
- 9.5.
hp2ps
-- Rendering heap profiles to PostScript - 9.6. Profiling Parallel and Concurrent Programs
- 9.7. Observing Code Coverage
- 9.8. Using “ticky-ticky” profiling (for implementors)
- 10. Advice on: sooner, faster, smaller, thriftier
- 11. GHC Language Features
- 11.1. Language options
- 11.2. Unboxed types and primitive operations
- 11.3. Syntactic extensions
- 11.3.1. Unicode syntax
- 11.3.2. The magic hash
- 11.3.3. Negative literals
- 11.3.4. Fractional looking integer literals
- 11.3.5. Binary integer literals
- 11.3.6. Hexadecimal floating point literals
- 11.3.7. Pattern guards
- 11.3.8. View patterns
- 11.3.9. n+k patterns
- 11.3.10. The recursive do-notation
- 11.3.11. Applicative do-notation
- 11.3.12. Parallel List Comprehensions
- 11.3.13. Generalised (SQL-like) List Comprehensions
- 11.3.14. Monad comprehensions
- 11.3.15. New monadic failure desugaring mechanism
- 11.3.16. Rebindable syntax and the implicit Prelude import
- 11.3.17. Postfix operators
- 11.3.18. Tuple sections
- 11.3.19. Lambda-case
- 11.3.20. Empty case alternatives
- 11.3.21. Multi-way if-expressions
- 11.3.22. Local Fixity Declarations
- 11.3.23. Import and export extensions
- 11.3.24. Summary of stolen syntax
- 11.4. Extensions to data types and type synonyms
- 11.4.1. Data types with no constructors
- 11.4.2. Data type contexts
- 11.4.3. Infix type constructors, classes, and type variables
- 11.4.4. Type operators
- 11.4.5. Liberalised type synonyms
- 11.4.6. Existentially quantified data constructors
- 11.4.7. Declaring data types with explicit constructor signatures
- 11.4.8. Generalised Algebraic Data Types (GADTs)
- 11.5. Extensions to the record system
- 11.6. Extensions to the "deriving" mechanism
- 11.6.1. Deriving instances for empty data types
- 11.6.2. Inferred context for deriving clauses
- 11.6.3. Stand-alone deriving declarations
- 11.6.4. Deriving instances of extra classes (
Data
, etc.) - 11.6.5. Generalised derived instances for newtypes
- 11.6.6. Deriving any other class
- 11.6.7. Deriving strategies
- 11.7. Pattern synonyms
- 11.8. Class and instances declarations
- 11.9. Type families
- 11.10. Datatype promotion
- 11.11. Kind polymorphism and Type-in-Type
- 11.11.1. The difference between
TypeInType
andPolyKinds
- 11.11.2. Overview of kind polymorphism
- 11.11.3. Overview of Type-in-Type
- 11.11.4. Principles of kind inference
- 11.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 11.11.6. Kind inference in closed type families
- 11.11.7. Kind inference in class instance declarations
- 11.11.8. Kind inference in type signatures
- 11.11.9. Explicit kind quantification
- 11.11.10. Kind-indexed GADTs
- 11.11.11. Higher-rank kinds
- 11.11.12. Constraints in kinds
- 11.11.13. The kind
*
- 11.11.14. Inferring dependency in datatype declarations
- 11.11.15. Kind defaulting without
PolyKinds
- 11.11.16. Pretty-printing in the presence of kind polymorphism
- 11.11.1. The difference between
- 11.12. Levity polymorphism
- 11.13. Type-Level Literals
- 11.14. Constraints in types
- 11.15. Extensions to type signatures
- 11.16. Lexically scoped type variables
- 11.17. Bindings and generalisation
- 11.18. Visible type application
- 11.19. Implicit parameters
- 11.20. Arbitrary-rank polymorphism
- 11.21. Impredicative polymorphism
- 11.22. Typed Holes
- 11.23. Partial Type Signatures
- 11.24. Custom compile-time errors
- 11.25. Deferring type errors to runtime
- 11.26. Template Haskell
- 11.27. Arrow notation
- 11.28. Bang patterns and Strict Haskell
- 11.29. Assertions
- 11.30. Static pointers
- 11.31. Pragmas
- 11.31.1.
LANGUAGE
pragma - 11.31.2.
OPTIONS_GHC
pragma - 11.31.3.
INCLUDE
pragma - 11.31.4.
WARNING
andDEPRECATED
pragmas - 11.31.5.
MINIMAL
pragma - 11.31.6.
INLINE
andNOINLINE
pragmas - 11.31.7.
LINE
pragma - 11.31.8.
COLUMN
pragma - 11.31.9.
RULES
pragma - 11.31.10.
SPECIALIZE
pragma - 11.31.11.
SPECIALIZE
instance pragma - 11.31.12.
UNPACK
pragma - 11.31.13.
NOUNPACK
pragma - 11.31.14.
SOURCE
pragma - 11.31.15.
COMPLETE
pragmas - 11.31.16. Disambiguating between multiple
COMPLETE
pragmas - 11.31.17.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 11.31.1.
- 11.32. Rewrite rules
- 11.33. Special built-in functions
- 11.34. Generic classes
- 11.35. Generic programming
- 11.36. Roles
- 11.37. HasCallStack
- 11.38. Concurrent and Parallel Haskell
- 11.39. Safe Haskell
- 12. Foreign function interface (FFI)
- 12.1. GHC differences to the FFI Chapter
- 12.2. GHC extensions to the FFI Chapter
- 12.3. Using the FFI with GHC
- 13. Extending and using GHC as a Library
- 14. What to do when something goes wrong
- 15. Debugging compiled programs
- 16. Other Haskell utility programs
- 17. Running GHC on Win32 systems
- 18. Known bugs and infelicities
- 18.1. Haskell standards vs. Glasgow Haskell: language non-compliance
- 18.1.1. Divergence from Haskell 98 and Haskell 2010
- 18.1.1.1. Lexical syntax
- 18.1.1.2. Context-free syntax
- 18.1.1.3. Expressions and patterns
- 18.1.1.4. Declarations and bindings
- 18.1.1.5. Typechecking of recursive binding groups
- 18.1.1.6. Module system and interface files
- 18.1.1.7. Numbers, basic types, and built-in classes
- 18.1.1.8. In
Prelude
support - 18.1.1.9. The Foreign Function Interface
- 18.1.1.10. Operator sections
- 18.1.2. GHC's interpretation of undefined behaviour in Haskell 98 and Haskell 2010
- 18.1.1. Divergence from Haskell 98 and Haskell 2010
- 18.2. Known bugs or infelicities
- 18.1. Haskell standards vs. Glasgow Haskell: language non-compliance
- 19. Eventlog encodings
- 20. Care and feeding of your GHC User's Guide