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. Hexadecimal floating point literals
- 9.3.7. Numeric underscores
- 9.3.8. Pattern guards
- 9.3.9. View patterns
- 9.3.10. n+k patterns
- 9.3.11. The recursive do-notation
- 9.3.12. Applicative do-notation
- 9.3.13. Parallel List Comprehensions
- 9.3.14. Generalised (SQL-like) List Comprehensions
- 9.3.15. Monad comprehensions
- 9.3.16. New monadic failure desugaring mechanism
- 9.3.17. Rebindable syntax and the implicit Prelude import
- 9.3.18. Postfix operators
- 9.3.19. Tuple sections
- 9.3.20. Lambda-case
- 9.3.21. Empty case alternatives
- 9.3.22. Multi-way if-expressions
- 9.3.23. Local Fixity Declarations
- 9.3.24. Import and export extensions
- 9.3.25. More liberal syntax for function arguments
- 9.3.26. 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. Deriving instances for empty data types
- 9.6.2. Inferred context for deriving clauses
- 9.6.3. Stand-alone deriving declarations
- 9.6.4. Deriving instances of extra classes (
Data
, etc.) - 9.6.5. Generalised derived instances for newtypes
- 9.6.6. Deriving any other class
- 9.6.7. Deriving strategies
- 9.6.8. Deriving via
- 9.7. Pattern synonyms
- 9.8. Class and instances declarations
- 9.9. Type families
- 9.10. Datatype promotion
- 9.11. Kind polymorphism
- 9.11.1. Overview of kind polymorphism
- 9.11.2. Overview of Type-in-Type
- 9.11.3. Principles of kind inference
- 9.11.4. Inferring the order of variables in a type/class declaration
- 9.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 9.11.6. Standalone kind signatures and polymorphic recursion
- 9.11.7. Standalone kind signatures and declaration headers
- 9.11.8. Kind inference in closed type families
- 9.11.9. Kind inference in class instance declarations
- 9.11.10. Kind inference in type signatures
- 9.11.11. Explicit kind quantification
- 9.11.12. Implicit quantification in type synonyms and type family instances
- 9.11.13. Kind-indexed GADTs
- 9.11.14. Higher-rank kinds
- 9.11.15. Constraints in kinds
- 9.11.16. The kind
Type
- 9.11.17. Inferring dependency in datatype declarations
- 9.11.18. Inferring dependency in user-written
forall
s - 9.11.19. Kind defaulting without
PolyKinds
- 9.11.20. Pretty-printing in the presence of kind polymorphism
- 9.12. Levity polymorphism
- 9.13. Type-Level Literals
- 9.14. Equality constraints, Coercible, and the kind Constraint
- 9.15. Quantified constraints
- 9.16. Extensions to type signatures
- 9.17. Lexically scoped type variables
- 9.18. Bindings and generalisation
- 9.19. Visible type application
- 9.20. Implicit parameters
- 9.21. Arbitrary-rank polymorphism
- 9.22. Impredicative polymorphism
- 9.23. Typed Holes
- 9.24. Partial Type Signatures
- 9.25. Custom compile-time errors
- 9.26. Deferring type errors to runtime
- 9.27. Template Haskell
- 9.28. Arrow notation
- 9.29. Bang patterns and Strict Haskell
- 9.30. Assertions
- 9.31. Static pointers
- 9.32. Pragmas
- 9.32.1.
LANGUAGE
pragma - 9.32.2.
OPTIONS_GHC
pragma - 9.32.3.
INCLUDE
pragma - 9.32.4.
WARNING
andDEPRECATED
pragmas - 9.32.5.
MINIMAL
pragma - 9.32.6.
INLINE
andNOINLINE
pragmas - 9.32.7.
LINE
pragma - 9.32.8.
COLUMN
pragma - 9.32.9.
RULES
pragma - 9.32.10.
SPECIALIZE
pragma - 9.32.11.
SPECIALIZE
instance pragma - 9.32.12.
UNPACK
pragma - 9.32.13.
NOUNPACK
pragma - 9.32.14.
SOURCE
pragma - 9.32.15.
COMPLETE
pragmas - 9.32.16.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 9.32.1.
- 9.33. Rewrite rules
- 9.34. Special built-in functions
- 9.35. Generic classes
- 9.36. Generic programming
- 9.37. Roles
- 9.38. HasCallStack
- 9.39. Concurrent and Parallel Haskell
- 9.40. Safe Haskell