hgeometry-combinatorial-0.9.0.0: Data structures, and Data types.

Data.DynamicOrd

Synopsis

# Documentation

newtype O (s :: *) (a :: *) Source #

Values of type a in our dynamically constructed Ord instance

Constructors

 O FieldsrunO :: a
Instances
 Reifies s (OrdDict a) => Eq (O s a) Source # Instance detailsDefined in Data.DynamicOrd Methods(==) :: O s a -> O s a -> Bool #(/=) :: O s a -> O s a -> Bool # (Eq (O s a), Reifies s (OrdDict a)) => Ord (O s a) Source # Instance detailsDefined in Data.DynamicOrd Methodscompare :: O s a -> O s a -> Ordering #(<) :: O s a -> O s a -> Bool #(<=) :: O s a -> O s a -> Bool #(>) :: O s a -> O s a -> Bool #(>=) :: O s a -> O s a -> Bool #max :: O s a -> O s a -> O s a #min :: O s a -> O s a -> O s a # Show a => Show (O s a) Source # Instance detailsDefined in Data.DynamicOrd MethodsshowsPrec :: Int -> O s a -> ShowS #show :: O s a -> String #showList :: [O s a] -> ShowS #

newtype OrdDict a Source #

An Ord Dictionary

Constructors

 OrdDict Fieldscompare_ :: a -> a -> Ordering

withOrd :: (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b Source #

Run a computation with a given ordering

# Introducing and removing the dynamic order type

extractOrd1 :: f (O s a) -> O s (f a) Source #

Lifts a container f whose values (of type a) depend on s into a more general computation in that produces a 'f a' (depending on s).

running time: $$O(1)$$

introOrd1 :: f a -> f (O s a) Source #

Introduce dynamic order in a container f.

running time: $$O(1)$$

liftOrd1 :: (f (O s a) -> f (O s a)) -> f a -> O s (f a) Source #

Lifts a function that works on a container f of orderable-things into one that works on dynamically ordered ones.

extractOrd2 :: f (O s k) v -> O s (f k v) Source #

Lifts a container f whose keys (of type k) depend on s into a more general computation in that produces a 'f k v' (depending on s).

running time: $$O(1)$$

introOrd2 :: f k v -> f (O s k) v Source #

Introduce dynamic order in a container f that has keys of type k.

running time: $$O(1)$$