ghc-8.2.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

HsLit

Synopsis

Documentation

data HsLit Source #

Haskell Literal

Constructors

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 TcGenDeriv, and from TRANSLATION

HsIntPrim SourceText Integer

literal Int#

HsWordPrim SourceText Integer

literal Word#

HsInt64Prim SourceText Integer

literal Int64#

HsWord64Prim SourceText Integer

literal Word64#

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

Instances

Eq HsLit Source # 

Methods

(==) :: HsLit -> HsLit -> Bool #

(/=) :: HsLit -> HsLit -> Bool #

Data HsLit Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsLit -> c HsLit #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsLit #

toConstr :: HsLit -> Constr #

dataTypeOf :: HsLit -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HsLit) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsLit) #

gmapT :: (forall b. Data b => b -> b) -> HsLit -> HsLit #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsLit -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsLit -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsLit -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsLit -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsLit -> m HsLit #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsLit -> m HsLit #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsLit -> m HsLit #

Outputable HsLit Source # 

data HsOverLit id Source #

Haskell Overloaded Literal

Constructors

OverLit 

Instances

Eq (HsOverLit id) Source # 

Methods

(==) :: HsOverLit id -> HsOverLit id -> Bool #

(/=) :: HsOverLit id -> HsOverLit id -> Bool #

DataId id => Data (HsOverLit id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsOverLit id -> c (HsOverLit id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsOverLit id) #

toConstr :: HsOverLit id -> Constr #

dataTypeOf :: HsOverLit id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsOverLit id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsOverLit id)) #

gmapT :: (forall b. Data b => b -> b) -> HsOverLit id -> HsOverLit id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsOverLit id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsOverLit id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsOverLit id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsOverLit id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsOverLit id -> m (HsOverLit id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsOverLit id -> m (HsOverLit id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsOverLit id -> m (HsOverLit id) #

Ord (HsOverLit id) Source # 

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 #

OutputableBndrId id => Outputable (HsOverLit id) Source # 

data OverLitVal Source #

Overloaded Literal Value

Constructors

HsIntegral !SourceText !Integer

Integer-looking literals;

HsFractional !FractionalLit

Frac-looking literals

HsIsString !SourceText !FastString

String-looking literals

Instances

Eq OverLitVal Source # 
Data OverLitVal Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitVal -> c OverLitVal #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitVal #

toConstr :: OverLitVal -> Constr #

dataTypeOf :: OverLitVal -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c OverLitVal) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitVal) #

gmapT :: (forall b. Data b => b -> b) -> OverLitVal -> OverLitVal #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r #

gmapQ :: (forall d. Data d => d -> u) -> OverLitVal -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitVal -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal #

Ord OverLitVal Source # 
Outputable OverLitVal 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