unison-util-relation-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Util.Relation4

Synopsis

Documentation

data Relation4 a b c d Source #

Constructors

Relation4 

Fields

Instances

Instances details
(Ord a, Ord b, Ord c, Ord d) => Monoid (Relation4 a b c d) Source # 
Instance details

Defined in Unison.Util.Relation4

Methods

mempty :: Relation4 a b c d #

mappend :: Relation4 a b c d -> Relation4 a b c d -> Relation4 a b c d #

mconcat :: [Relation4 a b c d] -> Relation4 a b c d #

(Ord a, Ord b, Ord c, Ord d) => Semigroup (Relation4 a b c d) Source # 
Instance details

Defined in Unison.Util.Relation4

Methods

(<>) :: Relation4 a b c d -> Relation4 a b c d -> Relation4 a b c d #

sconcat :: NonEmpty (Relation4 a b c d) -> Relation4 a b c d #

stimes :: Integral b0 => b0 -> Relation4 a b c d -> Relation4 a b c d #

(Show a, Show b, Show c, Show d) => Show (Relation4 a b c d) Source # 
Instance details

Defined in Unison.Util.Relation4

Methods

showsPrec :: Int -> Relation4 a b c d -> ShowS #

show :: Relation4 a b c d -> String #

showList :: [Relation4 a b c d] -> ShowS #

(Eq a, Eq b, Eq c, Eq d) => Eq (Relation4 a b c d) Source # 
Instance details

Defined in Unison.Util.Relation4

Methods

(==) :: Relation4 a b c d -> Relation4 a b c d -> Bool #

(/=) :: Relation4 a b c d -> Relation4 a b c d -> Bool #

(Ord a, Ord b, Ord c, Ord d) => Ord (Relation4 a b c d) Source # 
Instance details

Defined in Unison.Util.Relation4

Methods

compare :: Relation4 a b c d -> Relation4 a b c d -> Ordering #

(<) :: Relation4 a b c d -> Relation4 a b c d -> Bool #

(<=) :: Relation4 a b c d -> Relation4 a b c d -> Bool #

(>) :: Relation4 a b c d -> Relation4 a b c d -> Bool #

(>=) :: Relation4 a b c d -> Relation4 a b c d -> Bool #

max :: Relation4 a b c d -> Relation4 a b c d -> Relation4 a b c d #

min :: Relation4 a b c d -> Relation4 a b c d -> Relation4 a b c d #

size :: (Ord a, Ord b, Ord c, Ord d) => Relation4 a b c d -> Int Source #

toNestedList :: Relation4 a b c d -> [(a, (b, (c, d)))] Source #

toList :: Relation4 a b c d -> [(a, b, c, d)] Source #

empty :: (Ord a, Ord b, Ord c, Ord d) => Relation4 a b c d Source #

null :: Relation4 a b c d -> Bool Source #

fromList :: (Ord a, Ord b, Ord c, Ord d) => [(a, b, c, d)] -> Relation4 a b c d Source #

filter :: (Ord a, Ord b, Ord c, Ord d) => ((a, b, c, d) -> Bool) -> Relation4 a b c d -> Relation4 a b c d Source #

memberD13 :: (Ord a, Ord c) => a -> c -> Relation4 a b c d -> Bool Source #

selectD3 :: (Ord a, Ord b, Ord c, Ord d) => c -> Relation4 a b c d -> Relation4 a b c d Source #

selectD34 :: (Ord a, Ord b, Ord c, Ord d) => c -> d -> Relation4 a b c d -> Relation4 a b c d Source #

restrict34d12 :: (Ord a, Ord b, Ord c, Ord d) => (c, d) -> Relation4 a b c d -> Relation a b Source #

keys :: Relation4 a b c d -> (Set a, Set b, Set c, Set d) Source #

lookupD1 :: (Ord a, Ord b, Ord c, Ord d) => a -> Relation4 a b c d -> Relation3 b c d Source #

lookupD2 :: (Ord a, Ord b, Ord c, Ord d) => b -> Relation4 a b c d -> Relation3 a c d Source #

d1set :: Ord a => Relation4 a b c d -> Set a Source #

d12 :: (Ord a, Ord b) => Relation4 a b c d -> Relation a b Source #

d13 :: (Ord a, Ord c) => Relation4 a b c d -> Relation a c Source #

d34 :: (Ord c, Ord d) => Relation4 a b c d -> Relation c d Source #

d124 :: (Ord a, Ord b, Ord c, Ord d) => Relation4 a b c d -> Relation3 a b d Source #

Project out a relation that only includes the 1st, 2nd, and 4th dimensions.

d234 :: (Ord a, Ord b, Ord c, Ord d) => Relation4 a b c d -> Relation3 b c d Source #

Project out a relation that only includes the 2nd, 3rd, and 4th dimensions.

d12s :: (Ord a, Ord b) => Relation4 a b c d -> [(a, b)] Source #

d3s :: Relation4 a b c d -> Set c Source #

d4s :: Relation4 a b c d -> Set d Source #

insert :: (Ord a, Ord b, Ord c, Ord d) => a -> b -> c -> d -> Relation4 a b c d -> Relation4 a b c d Source #

delete :: (Ord a, Ord b, Ord c, Ord d) => a -> b -> c -> d -> Relation4 a b c d -> Relation4 a b c d Source #

mapD2 :: (Ord a, Ord b, Ord b', Ord c, Ord d) => (b -> b') -> Relation4 a b c d -> Relation4 a b' c d Source #

mapD2Monotonic :: (Ord a, Ord b, Ord b', Ord c, Ord d) => (b -> b') -> Relation4 a b c d -> Relation4 a b' c d Source #

Like mapD2, but takes a function that must be monotonic; i.e. compare x y == compare (f x) (f y).

insertAll :: Foldable f => Ord a => Ord b => Ord c => Ord d => f (a, b, c, d) -> Relation4 a b c d -> Relation4 a b c d Source #