10. GHC Language FeaturesΒΆ
- 10.1. Language options
- 10.2. Unboxed types and primitive operations
- 10.3. Syntactic extensions
- 10.3.1. Unicode syntax
- 10.3.2. The magic hash
- 10.3.3. Negative literals
- 10.3.4. Fractional looking integer literals
- 10.3.5. Binary integer literals
- 10.3.6. Hexadecimal floating point literals
- 10.3.7. Numeric underscores
- 10.3.8. Pattern guards
- 10.3.9. View patterns
- 10.3.10. n+k patterns
- 10.3.11. The recursive do-notation
- 10.3.12. Applicative do-notation
- 10.3.13. Parallel List Comprehensions
- 10.3.14. Generalised (SQL-like) List Comprehensions
- 10.3.15. Monad comprehensions
- 10.3.16. New monadic failure desugaring mechanism
- 10.3.17. Rebindable syntax and the implicit Prelude import
- 10.3.18. Postfix operators
- 10.3.19. Tuple sections
- 10.3.20. Lambda-case
- 10.3.21. Empty case alternatives
- 10.3.22. Multi-way if-expressions
- 10.3.23. Local Fixity Declarations
- 10.3.24. Import and export extensions
- 10.3.25. More liberal syntax for function arguments
- 10.3.26. Summary of stolen syntax
- 10.4. Extensions to data types and type synonyms
- 10.4.1. Data types with no constructors
- 10.4.2. Data type contexts
- 10.4.3. Infix type constructors, classes, and type variables
- 10.4.4. Type operators
- 10.4.5. Liberalised type synonyms
- 10.4.6. Existentially quantified data constructors
- 10.4.7. Declaring data types with explicit constructor signatures
- 10.4.8. Generalised Algebraic Data Types (GADTs)
- 10.5. Extensions to the record system
- 10.6. Extensions to the “deriving” mechanism
- 10.6.1. Deriving instances for empty data types
- 10.6.2. Inferred context for deriving clauses
- 10.6.3. Stand-alone deriving declarations
- 10.6.4. Deriving instances of extra classes (
Data
, etc.) - 10.6.5. Generalised derived instances for newtypes
- 10.6.6. Deriving any other class
- 10.6.7. Deriving strategies
- 10.6.8. Deriving via
- 10.7. Pattern synonyms
- 10.8. Class and instances declarations
- 10.9. Type families
- 10.10. Datatype promotion
- 10.11. Kind polymorphism
- 10.11.1. Overview of kind polymorphism
- 10.11.2. Overview of Type-in-Type
- 10.11.3. Principles of kind inference
- 10.11.4. Inferring the order of variables in a type/class declaration
- 10.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 10.11.6. Standalone kind signatures and polymorphic recursion
- 10.11.7. Standalone kind signatures and declaration headers
- 10.11.8. Kind inference in closed type families
- 10.11.9. Kind inference in class instance declarations
- 10.11.10. Kind inference in type signatures
- 10.11.11. Explicit kind quantification
- 10.11.12. Implicit quantification in type synonyms and type family instances
- 10.11.13. Kind-indexed GADTs
- 10.11.14. Higher-rank kinds
- 10.11.15. Constraints in kinds
- 10.11.16. The kind
Type
- 10.11.17. Inferring dependency in datatype declarations
- 10.11.18. Inferring dependency in user-written
forall
s - 10.11.19. Kind defaulting without
PolyKinds
- 10.11.20. Pretty-printing in the presence of kind polymorphism
- 10.12. Levity polymorphism
- 10.13. Type-Level Literals
- 10.14. Equality constraints, Coercible, and the kind Constraint
- 10.15. Quantified constraints
- 10.16. Extensions to type signatures
- 10.17. Lexically scoped type variables
- 10.18. Bindings and generalisation
- 10.19. Visible type application
- 10.20. Implicit parameters
- 10.21. Arbitrary-rank polymorphism
- 10.22. Impredicative polymorphism
- 10.23. Typed Holes
- 10.24. Partial Type Signatures
- 10.25. Custom compile-time errors
- 10.26. Deferring type errors to runtime
- 10.27. Template Haskell
- 10.28. Arrow notation
- 10.29. Bang patterns and Strict Haskell
- 10.30. Assertions
- 10.31. Static pointers
- 10.32. Pragmas
- 10.32.1.
LANGUAGE
pragma - 10.32.2.
OPTIONS_GHC
pragma - 10.32.3.
INCLUDE
pragma - 10.32.4.
WARNING
andDEPRECATED
pragmas - 10.32.5.
MINIMAL
pragma - 10.32.6.
INLINE
andNOINLINE
pragmas - 10.32.7.
LINE
pragma - 10.32.8.
COLUMN
pragma - 10.32.9.
RULES
pragma - 10.32.10.
SPECIALIZE
pragma - 10.32.11.
SPECIALIZE
instance pragma - 10.32.12.
UNPACK
pragma - 10.32.13.
NOUNPACK
pragma - 10.32.14.
SOURCE
pragma - 10.32.15.
COMPLETE
pragmas - 10.32.16.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 10.32.1.
- 10.33. Rewrite rules
- 10.34. Special built-in functions
- 10.35. Generic classes
- 10.36. Generic programming
- 10.37. Roles
- 10.38. HasCallStack
- 10.39. Concurrent and Parallel Haskell
- 10.40. Safe Haskell