Safe Haskell | None |
---|---|
Language | Haskell98 |
Module for coercion axioms, used to represent type family instances and newtypes
- data Branched
- data Unbranched
- type BranchIndex = Int
- data BranchList a br where
- FirstBranch :: a -> BranchList a br
- NextBranch :: a -> BranchList a br -> BranchList a Branched
- toBranchList :: [a] -> BranchList a Branched
- fromBranchList :: BranchList a br -> [a]
- toBranchedList :: BranchList a br -> BranchList a Branched
- toUnbranchedList :: BranchList a br -> BranchList a Unbranched
- brListLength :: BranchList a br -> Int
- brListNth :: BranchList a br -> BranchIndex -> a
- brListMap :: (a -> b) -> BranchList a br -> [b]
- brListFoldr :: (a -> b -> b) -> b -> BranchList a br -> b
- brListMapM :: Monad m => (a -> m b) -> BranchList a br -> m [b]
- brListFoldlM_ :: forall a b m br. Monad m => (a -> b -> m a) -> a -> BranchList b br -> m ()
- brListZipWith :: (a -> b -> c) -> BranchList a br1 -> BranchList b br2 -> [c]
- data CoAxiom br = CoAxiom {
- co_ax_unique :: Unique
- co_ax_name :: Name
- co_ax_role :: Role
- co_ax_tc :: TyCon
- co_ax_branches :: BranchList CoAxBranch br
- co_ax_implicit :: Bool
- data CoAxBranch = CoAxBranch {}
- toBranchedAxiom :: CoAxiom br -> CoAxiom Branched
- toUnbranchedAxiom :: CoAxiom br -> CoAxiom Unbranched
- coAxiomName :: CoAxiom br -> Name
- coAxiomArity :: CoAxiom br -> BranchIndex -> Arity
- coAxiomBranches :: CoAxiom br -> BranchList CoAxBranch br
- coAxiomTyCon :: CoAxiom br -> TyCon
- isImplicitCoAxiom :: CoAxiom br -> Bool
- coAxiomNumPats :: CoAxiom br -> Int
- coAxiomNthBranch :: CoAxiom br -> BranchIndex -> CoAxBranch
- coAxiomSingleBranch_maybe :: CoAxiom br -> Maybe CoAxBranch
- coAxiomRole :: CoAxiom br -> Role
- coAxiomSingleBranch :: CoAxiom Unbranched -> CoAxBranch
- coAxBranchTyVars :: CoAxBranch -> [TyVar]
- coAxBranchRoles :: CoAxBranch -> [Role]
- coAxBranchLHS :: CoAxBranch -> [Type]
- coAxBranchRHS :: CoAxBranch -> Type
- coAxBranchSpan :: CoAxBranch -> SrcSpan
- coAxBranchIncomps :: CoAxBranch -> [CoAxBranch]
- placeHolderIncomps :: [CoAxBranch]
- data Role
- fsFromRole :: Role -> FastString
- data CoAxiomRule = CoAxiomRule {
- coaxrName :: FastString
- coaxrTypeArity :: Int
- coaxrAsmpRoles :: [Role]
- coaxrRole :: Role
- coaxrProves :: [Type] -> [Eqn] -> Maybe Eqn
- type Eqn = Pair Type
- data BuiltInSynFamily = BuiltInSynFamily {
- sfMatchFam :: [Type] -> Maybe (CoAxiomRule, [Type], Type)
- sfInteractTop :: [Type] -> Type -> [Eqn]
- sfInteractInert :: [Type] -> Type -> [Type] -> Type -> [Eqn]
- trivialBuiltInFamily :: BuiltInSynFamily
Documentation
data Unbranched Source
type BranchIndex = Int Source
data BranchList a br where Source
FirstBranch :: a -> BranchList a br | |
NextBranch :: a -> BranchList a br -> BranchList a Branched |
Outputable a => Outputable (BranchList a br) |
toBranchList :: [a] -> BranchList a Branched Source
fromBranchList :: BranchList a br -> [a] Source
toBranchedList :: BranchList a br -> BranchList a Branched Source
toUnbranchedList :: BranchList a br -> BranchList a Unbranched Source
brListLength :: BranchList a br -> Int Source
brListNth :: BranchList a br -> BranchIndex -> a Source
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
A CoAxiom
is a "coercion constructor", i.e. a named equality axiom.
CoAxiom | |
|
toBranchedAxiom :: CoAxiom br -> CoAxiom Branched Source
toUnbranchedAxiom :: CoAxiom br -> CoAxiom Unbranched Source
coAxiomName :: CoAxiom br -> Name Source
coAxiomArity :: CoAxiom br -> BranchIndex -> Arity Source
coAxiomBranches :: CoAxiom br -> BranchList CoAxBranch br Source
coAxiomTyCon :: CoAxiom br -> TyCon Source
isImplicitCoAxiom :: CoAxiom br -> Bool Source
coAxiomNumPats :: CoAxiom br -> Int Source
coAxiomNthBranch :: CoAxiom br -> BranchIndex -> CoAxBranch Source
coAxiomRole :: CoAxiom br -> Role Source
coAxBranchTyVars :: CoAxBranch -> [TyVar] Source
coAxBranchRoles :: CoAxBranch -> [Role] Source
coAxBranchLHS :: CoAxBranch -> [Type] Source
coAxBranchRHS :: CoAxBranch -> Type Source
coAxBranchIncomps :: CoAxBranch -> [CoAxBranch] Source
fsFromRole :: Role -> FastString Source
data CoAxiomRule Source
For now, we work only with nominal equality.
CoAxiomRule | |
|
data BuiltInSynFamily Source
BuiltInSynFamily | |
|