Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data HsLit
- = HsChar SourceText Char
- | HsCharPrim SourceText Char
- | HsString SourceText FastString
- | HsStringPrim SourceText ByteString
- | HsInt SourceText Integer
- | HsIntPrim SourceText Integer
- | HsWordPrim SourceText Integer
- | HsInt64Prim SourceText Integer
- | HsWord64Prim SourceText Integer
- | HsInteger SourceText Integer Type
- | HsRat FractionalLit Type
- | HsFloatPrim FractionalLit
- | HsDoublePrim FractionalLit
- data HsOverLit id = OverLit {
- ol_val :: OverLitVal
- ol_rebindable :: PostRn id Bool
- ol_witness :: HsExpr id
- ol_type :: PostTc id Type
- data OverLitVal
- overLitType :: HsOverLit a -> PostTc a Type
- pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc
- pmPprHsLit :: HsLit -> SDoc
Documentation
Haskell Literal
HsChar SourceText Char | Character |
HsCharPrim SourceText Char | Unboxed character |
HsString SourceText FastString | String |
HsStringPrim SourceText ByteString | Packed bytes |
HsInt SourceText Integer | Genuinely an Int; arises from
|
HsIntPrim SourceText Integer | literal |
HsWordPrim SourceText Integer | literal |
HsInt64Prim SourceText Integer | literal |
HsWord64Prim SourceText Integer | literal |
HsInteger SourceText Integer Type | Genuinely an integer; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsRat FractionalLit Type | Genuinely a rational; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsFloatPrim FractionalLit | Unboxed Float |
HsDoublePrim FractionalLit | Unboxed Double |
Haskell Overloaded Literal
OverLit | |
|
data OverLitVal Source #
Overloaded Literal Value
HsIntegral !SourceText !Integer | Integer-looking literals; |
HsFractional !FractionalLit | Frac-looking literals |
HsIsString !SourceText !FastString | String-looking literals |
pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc Source #
pmPprHsLit :: HsLit -> SDoc Source #
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