12. GHC Language Features¶
- 12.1. Language options
- 12.2. Unboxed types and primitive operations
- 12.3. Syntactic extensions
- 12.3.1. Unicode syntax
- 12.3.2. The magic hash
- 12.3.3. Negative literals
- 12.3.4. Fractional looking integer literals
- 12.3.5. Binary integer literals
- 12.3.6. Hexadecimal floating point literals
- 12.3.7. Pattern guards
- 12.3.8. View patterns
- 12.3.9. n+k patterns
- 12.3.10. The recursive do-notation
- 12.3.11. Applicative do-notation
- 12.3.12. Parallel List Comprehensions
- 12.3.13. Generalised (SQL-like) List Comprehensions
- 12.3.14. Monad comprehensions
- 12.3.15. New monadic failure desugaring mechanism
- 12.3.16. Rebindable syntax and the implicit Prelude import
- 12.3.17. Postfix operators
- 12.3.18. Tuple sections
- 12.3.19. Lambda-case
- 12.3.20. Empty case alternatives
- 12.3.21. Multi-way if-expressions
- 12.3.22. Local Fixity Declarations
- 12.3.23. Import and export extensions
- 12.3.24. Summary of stolen syntax
- 12.4. Extensions to data types and type synonyms
- 12.4.1. Data types with no constructors
- 12.4.2. Data type contexts
- 12.4.3. Infix type constructors, classes, and type variables
- 12.4.4. Type operators
- 12.4.5. Liberalised type synonyms
- 12.4.6. Existentially quantified data constructors
- 12.4.7. Declaring data types with explicit constructor signatures
- 12.4.8. Generalised Algebraic Data Types (GADTs)
- 12.5. Extensions to the record system
- 12.6. Extensions to the “deriving” mechanism
- 12.6.1. Deriving instances for empty data types
- 12.6.2. Inferred context for deriving clauses
- 12.6.3. Stand-alone deriving declarations
- 12.6.4. Deriving instances of extra classes (
Data
, etc.) - 12.6.5. Generalised derived instances for newtypes
- 12.6.6. Deriving any other class
- 12.6.7. Deriving strategies
- 12.7. Pattern synonyms
- 12.8. Class and instances declarations
- 12.9. Type families
- 12.10. Datatype promotion
- 12.11. Kind polymorphism and Type-in-Type
- 12.11.1. The difference between
TypeInType
andPolyKinds
- 12.11.2. Overview of kind polymorphism
- 12.11.3. Overview of Type-in-Type
- 12.11.4. Principles of kind inference
- 12.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 12.11.6. Kind inference in closed type families
- 12.11.7. Kind inference in class instance declarations
- 12.11.8. Kind inference in type signatures
- 12.11.9. Explicit kind quantification
- 12.11.10. Kind-indexed GADTs
- 12.11.11. Higher-rank kinds
- 12.11.12. Constraints in kinds
- 12.11.13. The kind
*
- 12.11.14. Inferring dependency in datatype declarations
- 12.11.15. Kind defaulting without
PolyKinds
- 12.11.16. Pretty-printing in the presence of kind polymorphism
- 12.11.1. The difference between
- 12.12. Levity polymorphism
- 12.13. Type-Level Literals
- 12.14. Constraints in types
- 12.15. Extensions to type signatures
- 12.16. Lexically scoped type variables
- 12.17. Bindings and generalisation
- 12.18. Visible type application
- 12.19. Implicit parameters
- 12.20. Arbitrary-rank polymorphism
- 12.21. Impredicative polymorphism
- 12.22. Typed Holes
- 12.23. Partial Type Signatures
- 12.24. Custom compile-time errors
- 12.25. Deferring type errors to runtime
- 12.26. Template Haskell
- 12.27. Arrow notation
- 12.28. Bang patterns and Strict Haskell
- 12.29. Assertions
- 12.30. Static pointers
- 12.31. Pragmas
- 12.31.1.
LANGUAGE
pragma - 12.31.2.
OPTIONS_GHC
pragma - 12.31.3.
INCLUDE
pragma - 12.31.4.
WARNING
andDEPRECATED
pragmas - 12.31.5.
MINIMAL
pragma - 12.31.6.
INLINE
andNOINLINE
pragmas - 12.31.7.
LINE
pragma - 12.31.8.
COLUMN
pragma - 12.31.9.
RULES
pragma - 12.31.10.
SPECIALIZE
pragma - 12.31.11.
SPECIALIZE
instance pragma - 12.31.12.
UNPACK
pragma - 12.31.13.
NOUNPACK
pragma - 12.31.14.
SOURCE
pragma - 12.31.15.
COMPLETE
pragmas - 12.31.16. Disambiguating between multiple
COMPLETE
pragmas - 12.31.17.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 12.31.1.
- 12.32. Rewrite rules
- 12.33. Special built-in functions
- 12.34. Generic classes
- 12.35. Generic programming
- 12.36. Roles
- 12.37. HasCallStack
- 12.38. Concurrent and Parallel Haskell
- 12.39. Safe Haskell