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. Pattern guards
- 10.3.7. View patterns
- 10.3.8. n+k patterns
- 10.3.9. The recursive do-notation
- 10.3.10. Applicative do-notation
- 10.3.11. Parallel List Comprehensions
- 10.3.12. Generalised (SQL-like) List Comprehensions
- 10.3.13. Monad comprehensions
- 10.3.14. New monadic failure desugaring mechanism
- 10.3.15. Rebindable syntax and the implicit Prelude import
- 10.3.16. Postfix operators
- 10.3.17. Tuple sections
- 10.3.18. Lambda-case
- 10.3.19. Empty case alternatives
- 10.3.20. Multi-way if-expressions
- 10.3.21. Local Fixity Declarations
- 10.3.22. Import and export extensions
- 10.3.23. 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. Inferred context for deriving clauses
- 10.6.2. Stand-alone deriving declarations
- 10.6.3. Deriving instances of extra classes (
Data
, etc.) - 10.6.4. Deriving
Functor
instances - 10.6.5. Deriving
Foldable
instances - 10.6.6. Deriving
Traversable
instances - 10.6.7. Deriving
Typeable
instances - 10.6.8. Deriving
Lift
instances - 10.6.9. Generalised derived instances for newtypes
- 10.6.10. Deriving any other class
- 10.7. Pattern synonyms
- 10.8. Class and instances declarations
- 10.9. Type families
- 10.10. Datatype promotion
- 10.11. Kind polymorphism and Type-in-Type
- 10.11.1. The difference between
-XTypeInType
and-XPolyKinds
- 10.11.2. Overview of kind polymorphism
- 10.11.3. Overview of Type-in-Type
- 10.11.4. Principles of kind inference
- 10.11.5. Complete user-supplied kind signatures and polymorphic recursion
- 10.11.6. Kind inference in closed type families
- 10.11.7. Kind inference in class instance declarations
- 10.11.8. Kind inference in type signatures
- 10.11.9. Explicit kind quantification
- 10.11.10. Kind-indexed GADTs
- 10.11.11. Constraints in kinds
- 10.11.12. The kind
*
- 10.11.13. Inferring dependency in datatype declarations
- 10.11.14. Kind defaulting without
-XPolyKinds
- 10.11.15. Pretty-printing in the presence of kind polymorphism
- 10.11.1. The difference between
- 10.12. Runtime representation polymorphism
- 10.13. Type-Level Literals
- 10.14. Constraints in types
- 10.15. Extensions to type signatures
- 10.16. Lexically scoped type variables
- 10.17. Bindings and generalisation
- 10.18. Visible type application
- 10.19. Implicit parameters
- 10.20. Arbitrary-rank polymorphism
- 10.21. Impredicative polymorphism
- 10.22. Typed Holes
- 10.23. Partial Type Signatures
- 10.24. Custom compile-time errors
- 10.25. Deferring type errors to runtime
- 10.26. Template Haskell
- 10.27. Arrow notation
- 10.28. Bang patterns and Strict Haskell
- 10.29. Assertions
- 10.30. Static pointers
- 10.31. Pragmas
- 10.31.1. LANGUAGE pragma
- 10.31.2.
OPTIONS_GHC
pragma - 10.31.3.
INCLUDE
pragma - 10.31.4.
WARNING
andDEPRECATED
pragmas - 10.31.5. MINIMAL pragma
- 10.31.6. INLINE and NOINLINE pragmas
- 10.31.7.
LINE
pragma - 10.31.8.
RULES
pragma - 10.31.9.
SPECIALIZE
pragma - 10.31.10.
SPECIALIZE
instance pragma - 10.31.11.
UNPACK
pragma - 10.31.12.
NOUNPACK
pragma - 10.31.13.
SOURCE
pragma - 10.31.14.
OVERLAPPING
,OVERLAPPABLE
,OVERLAPS
, andINCOHERENT
pragmas
- 10.32. Rewrite rules
- 10.33. Special built-in functions
- 10.34. Generic classes
- 10.35. Generic programming
- 10.36. Roles
- 10.37. HasCallStack
- 10.38. Concurrent and Parallel Haskell
- 10.39. Safe Haskell