ghc-7.4.2: The GHC API

Safe Haskell | None

HsTypes

# Documentation

data HsType name

Constructors

HsForAllTy HsExplicitFlag [LHsTyVarBndr name] (LHsContext name) (LHsType name) |
HsTyVar name |
HsAppTy (LHsType name) (LHsType name) |
HsFunTy (LHsType name) (LHsType name) |
HsListTy (LHsType name) |
HsPArrTy (LHsType name) |
HsTupleTy HsTupleSort [LHsType name] |
HsOpTy (LHsType name) (LHsTyOp name) (LHsType name) |
HsParTy (LHsType name) |
HsIParamTy (IPName name) (LHsType name) |
HsEqTy (LHsType name) (LHsType name) |
HsKindSig (LHsType name) (LHsKind name) |
HsQuasiQuoteTy (HsQuasiQuote name) |
HsSpliceTy (HsSplice name) FreeVars PostTcKind |
HsDocTy (LHsType name) LHsDocString |
HsBangTy HsBang (LHsType name) |
HsRecTy [ConDeclField name] |
HsCoreTy Type |
HsExplicitListTy PostTcKind [LHsType name] |
HsExplicitTupleTy [PostTcKind] [LHsType name] |
HsWrapTy HsTyWrapper (HsType name) |

Instances

Typeable1 HsType |
Data name => Data (HsType name) |
OutputableBndr name => Outputable (HsType name) |

type LHsType name = Located (HsType name)

type HsKind name = HsType name

type LHsKind name = Located (HsKind name)

data HsTyVarBndr name

Constructors

UserTyVar name PostTcKind |
KindedTyVar name (LHsKind name) PostTcKind |

Instances

Typeable1 HsTyVarBndr |
Data name => Data (HsTyVarBndr name) |
OutputableBndr name => Outputable (HsTyVarBndr name) |

type LHsTyVarBndr name = Located (HsTyVarBndr name)

data HsTupleSort

Constructors

HsUnboxedTuple |
HsBoxedTuple |
HsConstraintTuple |
HsBoxedOrConstraintTuple |

Instances

Data HsTupleSort |
Typeable HsTupleSort |

data HsExplicitFlag

Constructors

Explicit |
Implicit |

Instances

Data HsExplicitFlag |
Typeable HsExplicitFlag |

type HsContext name = [LHsType name]

type LHsContext name = Located (HsContext name)

data HsQuasiQuote id

Constructors

HsQuasiQuote id SrcSpan FastString |

Instances

Typeable1 HsQuasiQuote |
Data id => Data (HsQuasiQuote id) |
OutputableBndr id => Outputable (HsQuasiQuote id) |

data HsTyWrapper

Constructors

WpKiApps [Kind] |

Instances

Data HsTyWrapper |
Typeable HsTyWrapper |

type LBangType name = Located (BangType name)

type BangType name = HsType name

data HsBang

Constructors

HsNoBang |
HsStrict |
HsUnpack |
HsUnpackFailed |
HsNoUnpack |

Instances

Eq HsBang |
Data HsBang |
Typeable HsBang |
Outputable HsBang |
Binary HsBang |

getBangType :: LHsType a -> LHsType a

getBangStrictness :: LHsType a -> HsBang

data ConDeclField name

Constructors

ConDeclField |

Fields

cd_fld_name :: Located name
cd_fld_type :: LBangType name
cd_fld_doc :: Maybe LHsDocString

Instances

Typeable1 ConDeclField |
Data name => Data (ConDeclField name) |

pprConDeclFields :: OutputableBndr name => [ConDeclField name] -> SDoc

mkExplicitHsForAllTy :: [LHsTyVarBndr name] -> LHsContext name -> LHsType name -> HsType name

mkImplicitHsForAllTy :: LHsContext name -> LHsType name -> HsType name

hsExplicitTvs :: LHsType name -> [name]

hsTyVarName :: HsTyVarBndr name -> name

hsTyVarNames :: [HsTyVarBndr name] -> [name]

replaceTyVarName :: Monad m => HsTyVarBndr name1 -> name2 -> (LHsKind name1 -> m (LHsKind name2)) -> m (HsTyVarBndr name2)

replaceLTyVarName :: Monad m => LHsTyVarBndr name1 -> name2 -> (LHsKind name1 -> m (LHsKind name2)) -> m (LHsTyVarBndr name2)

hsTyVarKind :: HsTyVarBndr name -> Kind

hsLTyVarKind :: LHsTyVarBndr name -> Kind

hsTyVarNameKind :: HsTyVarBndr name -> (name, Kind)

hsLTyVarName :: LHsTyVarBndr name -> name

hsLTyVarNames :: [LHsTyVarBndr name] -> [name]

hsLTyVarLocName :: LHsTyVarBndr name -> Located name

hsLTyVarLocNames :: [LHsTyVarBndr name] -> [Located name]

splitHsInstDeclTy_maybe :: HsType name -> Maybe ([LHsTyVarBndr name], HsContext name, name, [LHsType name])

splitLHsInstDeclTy_maybe :: LHsType name -> Maybe ([LHsTyVarBndr name], HsContext name, Located name, [LHsType name])

splitHsForAllTy :: HsType name -> ([LHsTyVarBndr name], HsContext name, HsType name)

splitLHsForAllTy :: LHsType name -> ([LHsTyVarBndr name], HsContext name, LHsType name)

splitHsClassTy_maybe :: HsType name -> Maybe (name, [LHsType name])

splitLHsClassTy_maybe :: LHsType name -> Maybe (Located name, [LHsType name])

splitHsFunType :: LHsType name -> ([LHsType name], LHsType name)

splitHsAppTys :: LHsType n -> [LHsType n] -> (LHsType n, [LHsType n])

mkHsAppTys :: OutputableBndr n => LHsType n -> [LHsType n] -> HsType n

mkHsOpTy :: LHsType name -> Located name -> LHsType name -> HsType name

pprParendHsType :: OutputableBndr name => HsType name -> SDoc

pprHsForAll :: OutputableBndr name => HsExplicitFlag -> [LHsTyVarBndr name] -> LHsContext name -> SDoc

pprHsContext :: OutputableBndr name => HsContext name -> SDoc

ppr_hs_context :: OutputableBndr name => HsContext name -> SDoc