ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

HsLit

Synopsis

- 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
  - = HsIntegral !SourceText !Integer
  - | HsFractional !FractionalLit
  - | HsIsString !SourceText !FastString
- overLitType :: HsOverLit a -> PostTc a Type
- pmPprHsLit :: HsLit -> SDoc

# Documentation

data HsLit Source #

Constructors

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 |

Instances

Eq HsLit # |
Methods (==) :: HsLit -> HsLit -> Bool # (/=) :: HsLit -> HsLit -> Bool #
Data HsLit # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsLit -> c HsLit Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsLit Source # toConstr :: HsLit -> Constr Source # dataTypeOf :: HsLit -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HsLit) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsLit) Source # gmapT :: (forall b. Data b => b -> b) -> HsLit -> HsLit Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsLit -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsLit -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsLit -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsLit -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsLit -> m HsLit Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsLit -> m HsLit Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsLit -> m HsLit Source #
Outputable HsLit # |
Methods ppr :: HsLit -> SDoc Source # pprPrec :: Rational -> HsLit -> SDoc Source #

data HsOverLit id Source #

Constructors

OverLit |
Fields ol_val :: OverLitVal ol_rebindable :: PostRn id Bool ol_witness :: HsExpr id ol_type :: PostTc id Type

Instances

Eq (HsOverLit id) # |
Methods (==) :: HsOverLit id -> HsOverLit id -> Bool # (/=) :: HsOverLit id -> HsOverLit id -> Bool #
DataId id => Data (HsOverLit id) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsOverLit id -> c (HsOverLit id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsOverLit id) Source # toConstr :: HsOverLit id -> Constr Source # dataTypeOf :: HsOverLit id -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsOverLit id)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsOverLit id)) Source # gmapT :: (forall b. Data b => b -> b) -> HsOverLit id -> HsOverLit id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsOverLit id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsOverLit id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsOverLit id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsOverLit id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsOverLit id -> m (HsOverLit id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsOverLit id -> m (HsOverLit id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsOverLit id -> m (HsOverLit id) Source #
Ord (HsOverLit id) # |
Methods compare :: HsOverLit id -> HsOverLit id -> Ordering # (<) :: HsOverLit id -> HsOverLit id -> Bool # (<=) :: HsOverLit id -> HsOverLit id -> Bool # (>) :: HsOverLit id -> HsOverLit id -> Bool # (>=) :: HsOverLit id -> HsOverLit id -> Bool # max :: HsOverLit id -> HsOverLit id -> HsOverLit id # min :: HsOverLit id -> HsOverLit id -> HsOverLit id #
OutputableBndr id => Outputable (HsOverLit id) # |
Methods ppr :: HsOverLit id -> SDoc Source # pprPrec :: Rational -> HsOverLit id -> SDoc Source #

data OverLitVal Source #

Constructors

HsIntegral !SourceText !Integer |
HsFractional !FractionalLit |
HsIsString !SourceText !FastString |

Instances

Eq OverLitVal # |
Methods (==) :: OverLitVal -> OverLitVal -> Bool # (/=) :: OverLitVal -> OverLitVal -> Bool #
Data OverLitVal # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitVal -> c OverLitVal Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitVal Source # toConstr :: OverLitVal -> Constr Source # dataTypeOf :: OverLitVal -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c OverLitVal) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitVal) Source # gmapT :: (forall b. Data b => b -> b) -> OverLitVal -> OverLitVal Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r Source # gmapQ :: (forall d. Data d => d -> u) -> OverLitVal -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitVal -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal Source #
Ord OverLitVal # |
Methods compare :: OverLitVal -> OverLitVal -> Ordering # (<) :: OverLitVal -> OverLitVal -> Bool # (<=) :: OverLitVal -> OverLitVal -> Bool # (>) :: OverLitVal -> OverLitVal -> Bool # (>=) :: OverLitVal -> OverLitVal -> Bool # max :: OverLitVal -> OverLitVal -> OverLitVal # min :: OverLitVal -> OverLitVal -> OverLitVal #
Outputable OverLitVal # |
Methods ppr :: OverLitVal -> SDoc Source # pprPrec :: Rational -> OverLitVal -> SDoc Source #

overLitType :: HsOverLit a -> PostTc a Type 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