interval-algebra-0.8.0: An implementation of Allen's interval algebra for temporal logic

IntervalAlgebra.PairedInterval

Description

Synopsis

# Documentation

data PairedInterval b a Source #

An Interval a paired with some other data of type b.

#### Instances

Instances details
 Source # Instance detailsDefined in IntervalAlgebra.PairedInterval Methodsbimap :: (a -> b) -> (c -> d) -> PairedInterval a c -> PairedInterval b d #first :: (a -> b) -> PairedInterval a c -> PairedInterval b c #second :: (b -> c) -> PairedInterval a b -> PairedInterval a c # (Ord a, Show a, Eq b, Monoid b) => IntervalCombinable (PairedInterval b) a Source # Instance detailsDefined in IntervalAlgebra.PairedInterval Methods(.+.) :: PairedInterval b a -> PairedInterval b a -> Maybe (PairedInterval b a) Source #(><) :: PairedInterval b a -> PairedInterval b a -> Maybe (PairedInterval b a) Source #(<+>) :: (Semigroup (f (PairedInterval b a)), Applicative f) => PairedInterval b a -> PairedInterval b a -> f (PairedInterval b a) Source # (Ord a, Show a) => Intervallic (PairedInterval b) a Source # Instance detailsDefined in IntervalAlgebra.PairedInterval MethodssetInterval :: PairedInterval b a -> Interval a -> PairedInterval b a Source #begin :: PairedInterval b a -> a Source #end :: PairedInterval b a -> a Source # (Eq a, Eq b) => Eq (PairedInterval b a) Source # Instance detailsDefined in IntervalAlgebra.PairedInterval Methods(==) :: PairedInterval b a -> PairedInterval b a -> Bool #(/=) :: PairedInterval b a -> PairedInterval b a -> Bool # (Eq a, Eq b, Ord a, Show a) => Ord (PairedInterval b a) Source # Defines A total ordering on 'PairedInterval b a' based on the 'Interval a' part. Instance detailsDefined in IntervalAlgebra.PairedInterval Methodscompare :: PairedInterval b a -> PairedInterval b a -> Ordering #(<) :: PairedInterval b a -> PairedInterval b a -> Bool #(<=) :: PairedInterval b a -> PairedInterval b a -> Bool #(>) :: PairedInterval b a -> PairedInterval b a -> Bool #(>=) :: PairedInterval b a -> PairedInterval b a -> Bool #max :: PairedInterval b a -> PairedInterval b a -> PairedInterval b a #min :: PairedInterval b a -> PairedInterval b a -> PairedInterval b a # (Show b, Show a, Ord a) => Show (PairedInterval b a) Source # Instance detailsDefined in IntervalAlgebra.PairedInterval MethodsshowsPrec :: Int -> PairedInterval b a -> ShowS #show :: PairedInterval b a -> String #showList :: [PairedInterval b a] -> ShowS #

data Empty Source #

Empty is used to trivially lift an Interval a into a PairedInterval.

#### Instances

Instances details
 Source # Instance detailsDefined in IntervalAlgebra.PairedInterval Methods(==) :: Empty -> Empty -> Bool #(/=) :: Empty -> Empty -> Bool # Source # Instance detailsDefined in IntervalAlgebra.PairedInterval Methods(<) :: Empty -> Empty -> Bool #(<=) :: Empty -> Empty -> Bool #(>) :: Empty -> Empty -> Bool #(>=) :: Empty -> Empty -> Bool #max :: Empty -> Empty -> Empty #min :: Empty -> Empty -> Empty # Source # Instance detailsDefined in IntervalAlgebra.PairedInterval MethodsshowsPrec :: Int -> Empty -> ShowS #show :: Empty -> String #showList :: [Empty] -> ShowS # Source # Instance detailsDefined in IntervalAlgebra.PairedInterval Methods(<>) :: Empty -> Empty -> Empty #stimes :: Integral b => b -> Empty -> Empty # Source # Instance detailsDefined in IntervalAlgebra.PairedInterval Methodsmappend :: Empty -> Empty -> Empty #mconcat :: [Empty] -> Empty #

makePairedInterval :: b -> Interval a -> PairedInterval b a Source #

Make a paired interval.

getPairData :: PairedInterval b a -> b Source #

Gets the data (i.e. non-interval) part of a PairedInterval.

intervals :: (Ord a, Show a) => [PairedInterval b a] -> [Interval a] Source #

Gets the intervals from a list of paired intervals.

Tests for equality of the data in a PairedInterval.

Lifts an Interval a into a PairedInterval Empty a, where Empty is a trivial type that contains no data.

trivialize :: Functor f => f (Interval a) -> f (PairedInterval Empty a) Source #

Lifts a Functor containing Interval a(s) into a Functor containing PairedInterval Empty a(s).