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. Numeric underscores
- 12.3.8. Pattern guards
- 12.3.9. View patterns
- 12.3.10. n+k patterns
- 12.3.11. The recursive do-notation
- 12.3.12. Applicative do-notation
- 12.3.13. Parallel List Comprehensions
- 12.3.14. Generalised (SQL-like) List Comprehensions
- 12.3.15. Monad comprehensions
- 12.3.16. New monadic failure desugaring mechanism
- 12.3.17. Rebindable syntax and the implicit Prelude import
- 12.3.18. Postfix operators
- 12.3.19. Tuple sections
- 12.3.20. Lambda-case
- 12.3.21. Empty case alternatives
- 12.3.22. Multi-way if-expressions
- 12.3.23. Local Fixity Declarations
- 12.3.24. Import and export extensions
- 12.3.25. More liberal syntax for function arguments
- 12.3.26. 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.6.8. Deriving via
- 12.7. Pattern synonyms
- 12.8. Class and instances declarations
- 12.9. Type families
- 12.10. Datatype promotion
- 12.11. Kind polymorphism
- 12.11.1. Overview of kind polymorphism
- 12.11.2. Overview of Type-in-Type
- 12.11.3. Principles of kind inference
- 12.11.4. Inferring the order of variables in a type/class declaration
- 12.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 12.11.6. Standalone kind signatures and polymorphic recursion
- 12.11.7. Standalone kind signatures and declaration headers
- 12.11.8. Kind inference in closed type families
- 12.11.9. Kind inference in class instance declarations
- 12.11.10. Kind inference in type signatures
- 12.11.11. Explicit kind quantification
- 12.11.12. Implicit quantification in type synonyms and type family instances
- 12.11.13. Kind-indexed GADTs
- 12.11.14. Higher-rank kinds
- 12.11.15. Constraints in kinds
- 12.11.16. The kind
Type
- 12.11.17. Inferring dependency in datatype declarations
- 12.11.18. Inferring dependency in user-written
forall
s - 12.11.19. Kind defaulting without
PolyKinds
- 12.11.20. Pretty-printing in the presence of kind polymorphism
- 12.12. Levity polymorphism
- 12.13. Type-Level Literals
- 12.14. Equality constraints, Coercible, and the kind Constraint
- 12.15. Quantified constraints
- 12.16. Extensions to type signatures
- 12.17. Lexically scoped type variables
- 12.18. Bindings and generalisation
- 12.19. Visible type application
- 12.20. Implicit parameters
- 12.21. Arbitrary-rank polymorphism
- 12.22. Impredicative polymorphism
- 12.23. Typed Holes
- 12.24. Partial Type Signatures
- 12.25. Custom compile-time errors
- 12.26. Deferring type errors to runtime
- 12.27. Template Haskell
- 12.28. Arrow notation
- 12.29. Bang patterns and Strict Haskell
- 12.30. Assertions
- 12.31. Static pointers
- 12.32. Pragmas
- 12.32.1.
LANGUAGE
pragma - 12.32.2.
OPTIONS_GHC
pragma - 12.32.3.
INCLUDE
pragma - 12.32.4.
WARNING
andDEPRECATED
pragmas - 12.32.5.
MINIMAL
pragma - 12.32.6.
INLINE
andNOINLINE
pragmas - 12.32.7.
LINE
pragma - 12.32.8.
COLUMN
pragma - 12.32.9.
RULES
pragma - 12.32.10.
SPECIALIZE
pragma - 12.32.11.
SPECIALIZE
instance pragma - 12.32.12.
UNPACK
pragma - 12.32.13.
NOUNPACK
pragma - 12.32.14.
SOURCE
pragma - 12.32.15.
COMPLETE
pragmas - 12.32.16.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 12.32.1.
- 12.33. Rewrite rules
- 12.34. Special built-in functions
- 12.35. Generic classes
- 12.36. Generic programming
- 12.37. Roles
- 12.38. HasCallStack
- 12.39. Concurrent and Parallel Haskell
- 12.40. Safe Haskell