15. GHC Language Features¶
- 15.1. Language options
- 15.2. Unboxed types and primitive operations
- 15.3. Syntactic extensions
- 15.3.1. Unicode syntax
- 15.3.2. The magic hash
- 15.3.3. Negative literals
- 15.3.4. Fractional looking integer literals
- 15.3.5. Binary integer literals
- 15.3.6. Hexadecimal floating point literals
- 15.3.7. Numeric underscores
- 15.3.8. Pattern guards
- 15.3.9. View patterns
- 15.3.10. n+k patterns
- 15.3.11. The recursive do-notation
- 15.3.12. Applicative do-notation
- 15.3.13. Parallel List Comprehensions
- 15.3.14. Generalised (SQL-like) List Comprehensions
- 15.3.15. Monad comprehensions
- 15.3.16. New monadic failure desugaring mechanism
- 15.3.17. Rebindable syntax and the implicit Prelude import
- 15.3.18. Postfix operators
- 15.3.19. Tuple sections
- 15.3.20. Lambda-case
- 15.3.21. Empty case alternatives
- 15.3.22. Multi-way if-expressions
- 15.3.23. Local Fixity Declarations
- 15.3.24. Import and export extensions
- 15.3.25. More liberal syntax for function arguments
- 15.3.26. Summary of stolen syntax
- 15.4. Extensions to data types and type synonyms
- 15.4.1. Data types with no constructors
- 15.4.2. Data type contexts
- 15.4.3. Infix type constructors, classes, and type variables
- 15.4.4. Type operators
- 15.4.5. Liberalised type synonyms
- 15.4.6. Existentially quantified data constructors
- 15.4.7. Declaring data types with explicit constructor signatures
- 15.4.8. Generalised Algebraic Data Types (GADTs)
- 15.5. Extensions to the record system
- 15.6. Extensions to the “deriving” mechanism
- 15.6.1. Deriving instances for empty data types
- 15.6.2. Inferred context for deriving clauses
- 15.6.3. Stand-alone deriving declarations
- 15.6.4. Deriving instances of extra classes (
Data
, etc.) - 15.6.5. Generalised derived instances for newtypes
- 15.6.6. Deriving any other class
- 15.6.7. Deriving strategies
- 15.6.8. Deriving via
- 15.7. Pattern synonyms
- 15.8. Class and instances declarations
- 15.9. Type families
- 15.10. Datatype promotion
- 15.11. Kind polymorphism
- 15.11.1. Overview of kind polymorphism
- 15.11.2. Overview of Type-in-Type
- 15.11.3. Principles of kind inference
- 15.11.4. Inferring the order of variables in a type/class declaration
- 15.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 15.11.6. Standalone kind signatures and polymorphic recursion
- 15.11.7. Standalone kind signatures and declaration headers
- 15.11.8. Kind inference in closed type families
- 15.11.9. Kind inference in class instance declarations
- 15.11.10. Kind inference in type signatures
- 15.11.11. Explicit kind quantification
- 15.11.12. Implicit quantification in type synonyms and type family instances
- 15.11.13. Kind-indexed GADTs
- 15.11.14. Higher-rank kinds
- 15.11.15. Constraints in kinds
- 15.11.16. The kind
Type
- 15.11.17. Inferring dependency in datatype declarations
- 15.11.18. Inferring dependency in user-written
forall
s - 15.11.19. Kind defaulting without
PolyKinds
- 15.11.20. Pretty-printing in the presence of kind polymorphism
- 15.12. Levity polymorphism
- 15.13. Type-Level Literals
- 15.14. Equality constraints, Coercible, and the kind Constraint
- 15.15. Quantified constraints
- 15.16. Extensions to type signatures
- 15.17. Lexically scoped type variables
- 15.18. Bindings and generalisation
- 15.19. Visible type application
- 15.20. Implicit parameters
- 15.21. Arbitrary-rank polymorphism
- 15.22. Impredicative polymorphism
- 15.23. Typed Holes
- 15.24. Partial Type Signatures
- 15.25. Custom compile-time errors
- 15.26. Deferring type errors to runtime
- 15.27. Template Haskell
- 15.28. Arrow notation
- 15.29. Bang patterns and Strict Haskell
- 15.30. Assertions
- 15.31. Static pointers
- 15.32. Pragmas
- 15.32.1.
LANGUAGE
pragma - 15.32.2.
OPTIONS_GHC
pragma - 15.32.3.
INCLUDE
pragma - 15.32.4.
WARNING
andDEPRECATED
pragmas - 15.32.5.
MINIMAL
pragma - 15.32.6.
INLINE
andNOINLINE
pragmas - 15.32.7.
LINE
pragma - 15.32.8.
COLUMN
pragma - 15.32.9.
RULES
pragma - 15.32.10.
SPECIALIZE
pragma - 15.32.11.
SPECIALIZE
instance pragma - 15.32.12.
UNPACK
pragma - 15.32.13.
NOUNPACK
pragma - 15.32.14.
SOURCE
pragma - 15.32.15.
COMPLETE
pragmas - 15.32.16.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 15.32.1.
- 15.33. Rewrite rules
- 15.34. Special built-in functions
- 15.35. Generic classes
- 15.36. Generic programming
- 15.37. Roles
- 15.38. HasCallStack
- 15.39. Concurrent and Parallel Haskell
- 15.40. Safe Haskell