ghc-7.10.3: The GHC API

Safe HaskellNone
LanguageHaskell2010

FamInstEnv

Contents

Synopsis

Documentation

type FamInstEnv = UniqFM FamilyInstEnv Source

identicalFamInstHead :: FamInst -> FamInst -> Bool Source

True when the LHSs are identical Used for overriding in GHCi

orphNamesOfFamInst :: FamInst -> NameSet Source

Collects the names of the concrete types and type constructors that make up the LHS of a type family instance, including the family name itself.

For instance, given `type family Foo a b`: `type instance Foo (F (G (H a))) b = ...` would yield [Foo,F,G,H]

Used in the implementation of ":info" in GHCi.

CoAxioms

topNormaliseType_maybe :: FamInstEnvs -> Type -> Maybe (Coercion, Type) Source

Get rid of *outermost* (or toplevel) * type function redex * newtypes using appropriate coercions. Specifically, if topNormaliseType_maybe env ty = Maybe (co, ty') then (a) co :: ty ~ ty' (b) ty' is not a newtype, and is not a type-family redex

However, ty' can be something like (Maybe (F ty)), where (F ty) is a redex.

Its a bit like Type.repType, but handles type families too The coercion returned is always an R coercion