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
type BranchIndex = IntSource
data BranchList a br whereSource
FirstBranch :: a -> BranchList a br | |
NextBranch :: a -> BranchList a br -> BranchList a Branched |
Outputable a => Outputable (BranchList a br) |
toBranchList :: [a] -> BranchList a BranchedSource
fromBranchList :: BranchList a br -> [a]Source
toBranchedList :: BranchList a br -> BranchList a BranchedSource
toUnbranchedList :: BranchList a br -> BranchList a UnbranchedSource
brListLength :: BranchList a br -> IntSource
brListNth :: BranchList a br -> BranchIndex -> aSource
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
A CoAxiom
is a "coercion constructor", i.e. a named equality axiom.
CoAxiom | |
|
toBranchedAxiom :: CoAxiom br -> CoAxiom BranchedSource
toUnbranchedAxiom :: CoAxiom br -> CoAxiom UnbranchedSource
coAxiomName :: CoAxiom br -> NameSource
coAxiomArity :: CoAxiom br -> BranchIndex -> AritySource
coAxiomBranches :: CoAxiom br -> BranchList CoAxBranch brSource
coAxiomTyCon :: CoAxiom br -> TyConSource
isImplicitCoAxiom :: CoAxiom br -> BoolSource
coAxiomNumPats :: CoAxiom br -> IntSource
coAxiomNthBranch :: CoAxiom br -> BranchIndex -> CoAxBranchSource
coAxiomRole :: CoAxiom br -> RoleSource
coAxBranchTyVars :: CoAxBranch -> [TyVar]Source
coAxBranchRoles :: CoAxBranch -> [Role]Source
coAxBranchLHS :: CoAxBranch -> [Type]Source
fsFromRole :: Role -> FastStringSource
data CoAxiomRuleSource
For now, we work only with nominal equality.
CoAxiomRule | |
|
BuiltInSynFamily | |
|