Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Relation via pair of maps for domain and range. Incomplete w.r.t. corresponding UHC.Util.Rel
- data Rel a b
- empty :: Rel a b
- toList :: Rel a b -> [(a, b)]
- fromList :: (Ord a, Ord b) => [(a, b)] -> Rel a b
- singleton :: (Ord a, Ord b) => a -> b -> Rel a b
- dom :: (Ord a, Ord b) => Rel a b -> Set a
- rng :: (Ord a, Ord b) => Rel a b -> Set b
- restrictDom :: (Ord a, Ord b) => (a -> Bool) -> Rel a b -> Rel a b
- restrictRng :: (Ord a, Ord b) => (b -> Bool) -> Rel a b -> Rel a b
- union :: (Ord a, Ord b) => Rel a b -> Rel a b -> Rel a b
- unions :: (Ord a, Ord b) => [Rel a b] -> Rel a b
- apply :: (Ord a, Ord b) => Rel a b -> a -> [b]
- toDomMap :: Ord a => Rel a b -> Map a [b]
- toRngMap :: Ord b => Rel a b -> Map b [a]
Documentation
Relation, represented as 2 maps from domain to range and the inverse, thus allowing faster lookup at the expense of some set like operations more expensive.