ghc-7.8.1: The GHC API

Safe HaskellNone
LanguageHaskell98

CoAxiom

Description

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

Synopsis

Documentation

data Branched Source

Instances

data BranchList a br where Source

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 -> b Source

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 br Source

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 CoAxBranch Source

Constructors

CoAxBranch 

Instances

data CoAxiomRule Source

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 Type Source

A more explicit representation for `t1 ~ t2`.

data BuiltInSynFamily Source

Constructors

BuiltInSynFamily 

Fields

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