Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ENode l = Node {}
- children :: Traversable l => ENode l -> [ClassId]
- newtype Operator l = Operator {
- unOperator :: l ()
- operator :: Traversable l => ENode l -> Operator l
- newtype NodeMap (l :: Type -> Type) a = NodeMap {}
- insertNM :: Ord1 l => ENode l -> a -> NodeMap l a -> NodeMap l a
- lookupNM :: Ord1 l => ENode l -> NodeMap l a -> Maybe a
- deleteNM :: Ord1 l => ENode l -> NodeMap l a -> NodeMap l a
- insertLookupNM :: Ord1 l => ENode l -> a -> NodeMap l a -> (Maybe a, NodeMap l a)
- foldlWithKeyNM' :: Ord1 l => (b -> ENode l -> a -> b) -> b -> NodeMap l a -> b
- foldrWithKeyNM' :: Ord1 l => (ENode l -> a -> b -> b) -> b -> NodeMap l a -> b
- sizeNM :: NodeMap l a -> Int
- traverseWithKeyNM :: Applicative t => (ENode l -> a -> t b) -> NodeMap l a -> t (NodeMap l b)
E-node
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.
Operator
An operator is solely the function symbol part of the e-node. Basically, this means children e-classes are ignored.
Operator | |
|
Instances
Show1 l => Show (Operator l) Source # | |
Eq1 l => Eq (Operator l) Source # | |
Ord1 l => Ord (Operator l) Source # | |
operator :: 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 # | |
Ord1 l => Monoid (NodeMap l a) Source # | |
Ord1 l => Semigroup (NodeMap l a) Source # | |
(Show1 l, Show a) => Show (NodeMap l a) Source # | |
insertNM :: Ord1 l => ENode l -> a -> NodeMap l a -> NodeMap l a Source #
Insert a value given an e-node in a NodeMap
insertLookupNM :: Ord1 l => ENode l -> a -> NodeMap l a -> (Maybe a, NodeMap l a) Source #
Insert a value and lookup by e-node in a NodeMap
foldlWithKeyNM' :: Ord1 l => (b -> ENode l -> a -> b) -> b -> NodeMap l a -> b Source #
As foldlWithKeyNM'
but in a NodeMap
foldrWithKeyNM' :: Ord1 l => (ENode l -> a -> b -> b) -> b -> NodeMap l a -> b Source #
As foldrWithKeyNM'
but in a NodeMap
sizeNM :: NodeMap l a -> Int Source #
Get the number of entries in a NodeMap
.
This operation takes constant time (O(1))
traverseWithKeyNM :: Applicative t => (ENode l -> a -> t b) -> NodeMap l a -> t (NodeMap l b) Source #
As traverseWithKeyNM
but in a NodeMap