Glasgow Haskell Compiler
9.13.20250511
  • 1. Introduction
  • 2. Release notes
  • 3. Using GHCi
  • 4. Using runghc
  • 5. Using GHC
  • 6. Language extensions
    • 6.1. Introduction
    • 6.2. Syntax
    • 6.3. Import and export
    • 6.4. Types
      • 6.4.1. Data types with no constructors
      • 6.4.2. Data type contexts
      • 6.4.3. Infix type constructors, classes, and type variables
      • 6.4.4. Type operators
      • 6.4.5. Liberalised type synonyms
      • 6.4.6. Type variable defaulting
      • 6.4.7. Existentially quantified data constructors
      • 6.4.8. Declaring data types with explicit constructor signatures
      • 6.4.9. Generalised Algebraic Data Types (GADTs)
      • 6.4.10. Type families
      • 6.4.11. Datatype promotion
      • 6.4.12. Unique syntax for type-level lists and tuples
      • 6.4.13. Type-level data declarations
      • 6.4.14. Kind polymorphism
      • 6.4.15. Representation polymorphism
      • 6.4.16. Type-Level Literals
      • 6.4.17. Visible type application
      • 6.4.18. Type abstractions
      • 6.4.19. Required type arguments
      • 6.4.20. Arbitrary-rank polymorphism
      • 6.4.21. Impredicative polymorphism
      • 6.4.22. Linear types
      • 6.4.23. Custom compile-time errors
      • 6.4.24. Deferring type errors to runtime
      • 6.4.25. Roles
    • 6.5. Records
    • 6.6. Deriving mechanism
    • 6.7. Patterns
    • 6.8. Class and instances declarations
    • 6.9. Literals
    • 6.10. Constraints
    • 6.11. Type signatures
    • 6.12. Bindings and generalisation
    • 6.13. Template Haskell
    • 6.14. Bang patterns and Strict Haskell
    • 6.15. Parallel and Concurrent
    • 6.16. Unboxed types and primitive operations
    • 6.17. Foreign function interface (FFI)
    • 6.18. Safe Haskell
    • 6.19. Miscellaneous
    • 6.20. Pragmas
  • 7. Extending and using GHC as a Library
  • 8. Profiling
  • 9. Debugging compiled programs
  • 10. What to do when something goes wrong
  • 11. Hints
  • 12. Other Haskell utility programs
  • 13. Running GHC on Win32 systems
  • 14. FFI and the JavaScript Backend
  • 15. Using the GHC WebAssembly backend
  • 16. Known bugs and infelicities
  • 17. Eventlog encodings
  • 18. Glossary
  • 19. Care and feeding of your GHC User’s Guide
Glasgow Haskell Compiler
  • 6. Language extensions
  • 6.4. Types
  • View page source

6.4. Types¶

  • 6.4.1. Data types with no constructors
  • 6.4.2. Data type contexts
  • 6.4.3. Infix type constructors, classes, and type variables
  • 6.4.4. Type operators
  • 6.4.5. Liberalised type synonyms
  • 6.4.6. Type variable defaulting
  • 6.4.7. Existentially quantified data constructors
  • 6.4.8. Declaring data types with explicit constructor signatures
  • 6.4.9. Generalised Algebraic Data Types (GADTs)
  • 6.4.10. Type families
  • 6.4.11. Datatype promotion
  • 6.4.12. Unique syntax for type-level lists and tuples
  • 6.4.13. Type-level data declarations
  • 6.4.14. Kind polymorphism
  • 6.4.15. Representation polymorphism
  • 6.4.16. Type-Level Literals
  • 6.4.17. Visible type application
  • 6.4.18. Type abstractions
  • 6.4.19. Required type arguments
  • 6.4.20. Arbitrary-rank polymorphism
  • 6.4.21. Impredicative polymorphism
  • 6.4.22. Linear types
  • 6.4.23. Custom compile-time errors
  • 6.4.24. Deferring type errors to runtime
  • 6.4.25. Roles
Previous Next

© Copyright 2023, GHC Team.

Built with Sphinx using a theme provided by Read the Docs.