Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Relation via Set of tuples
- type Rel a b = Set (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
- mapDom :: (Ord a, Ord b, Ord x) => (a -> x) -> Rel a b -> Rel x b
- mapRng :: (Ord a, Ord b, Ord x) => (b -> x) -> Rel a b -> Rel a x
- partitionDom :: (Ord a, Ord b) => (a -> Bool) -> Rel a b -> (Rel a b, Rel a b)
- partitionRng :: (Ord a, Ord b) => (b -> Bool) -> Rel a b -> (Rel a b, Rel a b)
- intersection :: (Ord a, Ord b) => Rel a b -> Rel a b -> Rel a b
- difference :: (Ord a, Ord b) => Rel a b -> 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]
- mapDomRng :: (Ord a, Ord b, Ord a', Ord b') => ((a, b) -> (a', b')) -> Rel a b -> Rel a' b'
Documentation
partitionDom :: (Ord a, Ord b) => (a -> Bool) -> Rel a b -> (Rel a b, Rel a b) Source #
Partition domain
partitionRng :: (Ord a, Ord b) => (b -> Bool) -> Rel a b -> (Rel a b, Rel a b) Source #
Partition range
intersection :: (Ord a, Ord b) => Rel a b -> Rel a b -> Rel a b Source #
Intersect jointly on domain and range