ghc-7.0.3: The GHC API

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 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)

data HsTyVarBndr name

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)

data HsExplicitFlag

Constructors

Explicit |
Implicit |

Instances

Data HsExplicitFlag |
Typeable HsExplicitFlag |

type HsContext name = [LHsPred name]

type LHsContext name = Located (HsContext name)

data HsPred name

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)

data HsQuasiQuote id

Constructors

HsQuasiQuote id SrcSpan FastString |

Instances

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

type LBangType name = Located (BangType name)

type BangType name = HsType name

data HsBang

Constructors

HsNoBang |
HsStrict |
HsUnpack |
HsUnpackFailed |

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 :: HsTyVarBndr name1 -> name2 -> HsTyVarBndr name2

hsTyVarKind :: HsTyVarBndr 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 :: OutputableBndr name => HsType name -> ([LHsTyVarBndr name], HsContext name, name, [LHsType name])

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

type PostTcType = Type

placeHolderType :: PostTcType

type PostTcKind = Kind

placeHolderKind :: PostTcKind

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