HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleghc-internal-10.0.0Haskell2010

GHC.Internal.TH.Lib

GHC.Internal.TH.Lib exposes some additional functionality that is used internally in GHC's integration with Template Haskell. This is not a part of the public API, and as such, there are no API guarantees for this module from version to version.

Contents
  1. Type synonyms
  2. Lowercase pattern syntax functions
  3. Stmt
  4. Range
  5. Body
  6. Guard
  7. Match and Clause
  8. Exp
  9. arithSeqE Shortcuts
  10. Dec
  11. Type
  12. Type Literals
  13. Kind
  14. Type family result
  15. Injectivity annotation
  16. Role
  17. Callconv
  18. Safety
  19. FunDep
  20. RuleBndr
  21. AnnTarget
  22. Pattern Synonyms (sub constructs)
  23. Useful helper function
  24. Documentation combinators
Synopsis

Type synonyms

typetype TExpQ (a :: TYPE r) = Q (TExp a)

Representation-polymorphic since template-haskell-2.17.0.0.

Lowercase pattern syntax functions

Stmt

Range

Body

Guard

Match and Clause

Exp

arithSeqE Shortcuts

Dec

Type

Type Literals

Kind

Type family result

Injectivity annotation

Role

Callconv

Safety

FunDep

RuleBndr

AnnTarget

Pattern Synonyms (sub constructs)

Useful helper function

Documentation combinators

valuewithDecDoc :: String -> Q Dec -> Q Dec

Attaches Haddock documentation to the declaration provided. Unlike putDoc, the names do not need to be in scope when calling this function so it can be used for quoted declarations and anything else currently being spliced. Not all declarations can have documentation attached to them. For those that can't, withDecDoc will return it unchanged without any side effects.