HORIZON HASKELLDocslts/ghc-9.14.xb2f3bfd2026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Moduleghc-9.14.1GHC2021

GHC.Hs.Lit

Source-language literals

  • 3 types
  • 7 values
  • Packageghc-9.14.1
  • Exports10
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceLit.hs

Convert a literal from one index type to another. The constraint XXLit (GhcPass p)~DataConCantHappen means that once the XLit constructor is inhabited, we can no longer go back to the case where its not. In practice it just means you can't just convertLit to go from (HsLit GhcTc) -> (HsLit GhcPs/GhcRn), while all other conversions are fine.

valuepmPprHsLit :: IsPass p => HsLit (GhcPass p) -> SDoc
#

pmPprHsLit pretty prints literals and is used when pretty printing pattern match warnings. All are printed the same (i.e., without hashes if they are primitive and not wrapped in constructors if they are boxed). This happens mainly for too reasons: * We do not want to expose their internal representation * The warnings become too messy

datadata HsLitTc
#

Constructors

Instances2Eq, Data
  • Eq HsLitTcDefined in ghc-9.14.1 · GHC.Hs.Lit
  • Data HsLitTcDefined in ghc-9.14.1 · GHC.Hs.Instances · orphan

Orphan instances

5 instances