Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ENode (l :: Type -> Type) = Node {}
- children :: forall (l :: Type -> Type). Traversable l => ENode l -> [ClassId]
- newtype Operator (l :: Type -> Type) = Operator {
- unOperator :: l ()
- operator :: forall (l :: Type -> Type). Traversable l => ENode l -> Operator l
- newtype NodeMap (l :: Type -> Type) a = NodeMap {}
- insertNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> a -> NodeMap l a -> NodeMap l a
- lookupNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> NodeMap l a -> Maybe a
- deleteNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> NodeMap l a -> NodeMap l a
- insertLookupNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> a -> NodeMap l a -> (Maybe a, NodeMap l a)
- foldlWithKeyNM' :: forall (l :: Type -> Type) b a. Ord (l ClassId) => (b -> ENode l -> a -> b) -> b -> NodeMap l a -> b
- foldrWithKeyNM' :: forall (l :: Type -> Type) a b. Ord (l ClassId) => (ENode l -> a -> b -> b) -> b -> NodeMap l a -> b
- sizeNM :: forall (l :: Type -> Type) a. NodeMap l a -> Int
- traverseWithKeyNM :: forall t (l :: Type -> Type) a b. Applicative t => (ENode l -> a -> t b) -> NodeMap l a -> t (NodeMap l b)
E-node
newtype ENode (l :: Type -> Type) Source #
An e-node is a function symbol paired with a list of children e-classes.
We define an e-node to be the base functor of some recursive data type
parametrized over ClassId
, i.e. all recursive fields are rather e-class ids.
children :: forall (l :: Type -> Type). Traversable l => ENode l -> [ClassId] Source #
Get the children e-class ids of an e-node
Operator
newtype Operator (l :: Type -> Type) Source #
An operator is solely the function symbol part of the e-node. Basically, this means children e-classes are ignored.
Operator | |
|
Instances
Show (l ()) => Show (Operator l) Source # | |
Eq (l ()) => Eq (Operator l) Source # | |
Ord (l ()) => Ord (Operator l) Source # | |
operator :: forall (l :: Type -> Type). Traversable l => ENode l -> Operator l Source #
Get the operator (function symbol) of an e-node
Node Map
newtype NodeMap (l :: Type -> Type) a Source #
A mapping from e-nodes of l
to a
Instances
Foldable (NodeMap l) Source # | |
Defined in Data.Equality.Graph.Nodes fold :: Monoid m => NodeMap l m -> m # foldMap :: Monoid m => (a -> m) -> NodeMap l a -> m # foldMap' :: Monoid m => (a -> m) -> NodeMap l a -> m # foldr :: (a -> b -> b) -> b -> NodeMap l a -> b # foldr' :: (a -> b -> b) -> b -> NodeMap l a -> b # foldl :: (b -> a -> b) -> b -> NodeMap l a -> b # foldl' :: (b -> a -> b) -> b -> NodeMap l a -> b # foldr1 :: (a -> a -> a) -> NodeMap l a -> a # foldl1 :: (a -> a -> a) -> NodeMap l a -> a # toList :: NodeMap l a -> [a] # length :: NodeMap l a -> Int # elem :: Eq a => a -> NodeMap l a -> Bool # maximum :: Ord a => NodeMap l a -> a # minimum :: Ord a => NodeMap l a -> a # | |
Traversable (NodeMap l) Source # | |
Defined in Data.Equality.Graph.Nodes | |
Functor (NodeMap l) Source # | |
Ord (l ClassId) => Monoid (NodeMap l a) Source # | |
Ord (l ClassId) => Semigroup (NodeMap l a) Source # | |
(Show a, Show (l ClassId)) => Show (NodeMap l a) Source # | |
insertNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> a -> NodeMap l a -> NodeMap l a Source #
Insert a value given an e-node in a NodeMap
lookupNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> NodeMap l a -> Maybe a Source #
Lookup an e-node in a NodeMap
deleteNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> NodeMap l a -> NodeMap l a Source #
Delete an e-node in a NodeMap
insertLookupNM :: forall (l :: Type -> Type) a. Ord (l ClassId) => ENode l -> a -> NodeMap l a -> (Maybe a, NodeMap l a) Source #
Insert a value and lookup by e-node in a NodeMap
foldlWithKeyNM' :: forall (l :: Type -> Type) b a. Ord (l ClassId) => (b -> ENode l -> a -> b) -> b -> NodeMap l a -> b Source #
As foldlWithKeyNM'
but in a NodeMap
foldrWithKeyNM' :: forall (l :: Type -> Type) a b. Ord (l ClassId) => (ENode l -> a -> b -> b) -> b -> NodeMap l a -> b Source #
As foldrWithKeyNM'
but in a NodeMap
sizeNM :: forall (l :: Type -> Type) a. NodeMap l a -> Int Source #
Get the number of entries in a NodeMap
.
This operation takes constant time (O(1))
traverseWithKeyNM :: forall t (l :: Type -> Type) a b. Applicative t => (ENode l -> a -> t b) -> NodeMap l a -> t (NodeMap l b) Source #
As traverseWithKeyNM
but in a NodeMap