ghc-7.8.20140130: The GHC API

Safe HaskellNone
LanguageHaskell98

CoAxiom

Description

Module for coercion axioms, used to represent type family instances and newtypes

Synopsis

Documentation

data BranchList a br whereSource

Constructors

FirstBranch :: a -> BranchList a br 
NextBranch :: a -> BranchList a br -> BranchList a Branched 

Instances

brListMap :: (a -> b) -> BranchList a br -> [b]Source

brListFoldr :: (a -> b -> b) -> b -> BranchList a br -> bSource

brListMapM :: Monad m => (a -> m b) -> BranchList a br -> m [b]Source

brListFoldlM_ :: forall a b m br. Monad m => (a -> b -> m a) -> a -> BranchList b br -> m ()Source

brListZipWith :: (a -> b -> c) -> BranchList a br1 -> BranchList b br2 -> [c]Source

data CoAxiom brSource

A CoAxiom is a "coercion constructor", i.e. a named equality axiom.

Instances

Eq (CoAxiom br) 
Typeable * br => Data (CoAxiom br) 
Ord (CoAxiom br) 
Outputable (CoAxiom br) 
Uniquable (CoAxiom br) 
NamedThing (CoAxiom br) 
Typeable (* -> *) CoAxiom 

data CoAxiomRuleSource

For now, we work only with nominal equality.

Constructors

CoAxiomRule 

Fields

coaxrName :: FastString
 
coaxrTypeArity :: Int
 
coaxrAsmpRoles :: [Role]
 
coaxrRole :: Role
 
coaxrProves :: [Type] -> [Eqn] -> Maybe Eqn

coaxrProves returns Nothing when it doesn't like the supplied arguments. When this happens in a coercion that means that the coercion is ill-formed, and Core Lint checks for that.

type Eqn = Pair TypeSource

A more explicit representation for `t1 ~ t2`.

data BuiltInSynFamilySource

Constructors

BuiltInSynFamily 

Fields

sfMatchFam :: [Type] -> Maybe (CoAxiomRule, [Type], Type)
 
sfInteractTop :: [Type] -> Type -> [Eqn]
 
sfInteractInert :: [Type] -> Type -> [Type] -> Type -> [Eqn]