ghc-7.0.3: The GHC API

PprTyThing

Synopsis

- type PrintExplicitForalls = Bool
- pprTyThing :: PrintExplicitForalls -> TyThing -> SDoc
- pprTyThingInContext :: PrintExplicitForalls -> TyThing -> SDoc
- pprTyThingParent_maybe :: TyThing -> Maybe TyThing
- pprTyThingLoc :: PrintExplicitForalls -> TyThing -> SDoc
- pprTyThingInContextLoc :: PrintExplicitForalls -> TyThing -> SDoc
- pprTyThingHdr :: PrintExplicitForalls -> TyThing -> SDoc
- pprTypeForUser :: PrintExplicitForalls -> Type -> SDoc

# Documentation

type PrintExplicitForalls = Bool

pprTyThing :: PrintExplicitForalls -> TyThing -> SDoc

Pretty-prints a `TyThing`.

pprTyThingInContext :: PrintExplicitForalls -> TyThing -> SDoc

Pretty-prints a `TyThing` in context: that is, if the entity is a data constructor, record selector, or class method, then the entity's parent declaration is pretty-printed with irrelevant parts omitted.

pprTyThingParent_maybe :: TyThing -> Maybe TyThing

pprTyThingLoc :: PrintExplicitForalls -> TyThing -> SDoc

Pretty-prints a `TyThing` with its defining location.

pprTyThingInContextLoc :: PrintExplicitForalls -> TyThing -> SDoc

Like `pprTyThingInContext`, but adds the defining location.

pprTyThingHdr :: PrintExplicitForalls -> TyThing -> SDoc

Pretty-prints the `TyThing` header. For functions and data constructors the function is equivalent to `pprTyThing` but for type constructors and classes it prints only the header part of the declaration.

pprTypeForUser :: PrintExplicitForalls -> Type -> SDoc