ghc-7.0.3: The GHC API

HsTypes

# Documentation

data HsType name Source

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 Boxity [LHsType name] |
HsOpTy (LHsType name) (Located name) (LHsType name) |
HsParTy (LHsType name) |
HsNumTy Integer |
HsPredTy (HsPred name) |
HsKindSig (LHsType name) Kind |
HsQuasiQuoteTy (HsQuasiQuote name) |
HsSpliceTy (HsSplice name) FreeVars PostTcKind |
HsDocTy (LHsType name) LHsDocString |
HsBangTy HsBang (LHsType name) |
HsRecTy [ConDeclField name] |
HsCoreTy Type |

Instances

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

type LHsType name = Located (HsType name)Source

data HsTyVarBndr name Source

Constructors

UserTyVar name PostTcKind |
KindedTyVar name Kind |

Instances

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

type LHsTyVarBndr name = Located (HsTyVarBndr name)Source

data HsExplicitFlag Source

Constructors

Explicit |
Implicit |

Instances

Data HsExplicitFlag |
Typeable HsExplicitFlag |

type HsContext name = [LHsPred name]Source

type LHsContext name = Located (HsContext name)Source

data HsPred name Source

Constructors

HsClassP name [LHsType name] |
HsEqualP (LHsType name) (LHsType name) |
HsIParam (IPName name) (LHsType name) |

Instances

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

type LHsPred name = Located (HsPred name)Source

data HsQuasiQuote id Source

Constructors

HsQuasiQuote id SrcSpan FastString |

Instances

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

type LBangType name = Located (BangType name)Source

type BangType name = HsType nameSource

data HsBang Source

Constructors

HsNoBang |
HsStrict |
HsUnpack |
HsUnpackFailed |

Instances

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

getBangType :: LHsType a -> LHsType aSource

getBangStrictness :: LHsType a -> HsBang Source

data ConDeclField name Source

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 Source

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

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

hsExplicitTvs :: LHsType name -> [name]Source

hsTyVarName :: HsTyVarBndr name -> nameSource

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

replaceTyVarName :: HsTyVarBndr name1 -> name2 -> HsTyVarBndr name2Source

hsTyVarKind :: HsTyVarBndr name -> Kind Source

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

hsLTyVarName :: LHsTyVarBndr name -> nameSource

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

hsLTyVarLocName :: LHsTyVarBndr name -> Located nameSource

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

splitHsInstDeclTy :: OutputableBndr name => HsType name -> ([LHsTyVarBndr name], HsContext name, name, [LHsType name])Source

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

type PostTcType = Type Source

placeHolderType :: PostTcType Source

type PostTcKind = Kind Source

placeHolderKind :: PostTcKind Source

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

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

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

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