interval-algebra-0.8.2: An implementation of Allen's interval algebra for temporal logic
Copyright(c) NoviSci Inc 2020
LicenseBSD3
Maintainerbsaul@novisci.com
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

IntervalAlgebra.PairedInterval

Description

 
Synopsis

Documentation

data PairedInterval b a Source #

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

Instances

Instances details
Bifunctor PairedInterval Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Methods

bimap :: (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, Eq b, Monoid b) => IntervalCombinable (PairedInterval b) a Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Ord a => Intervallic (PairedInterval b) a Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

(Eq a, Eq b) => Eq (PairedInterval b a) Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

(Eq a, Eq b, Ord a) => Ord (PairedInterval b a) Source #

Defines A total ordering on 'PairedInterval b a' based on the 'Interval a' part.

Instance details

Defined in IntervalAlgebra.PairedInterval

(Show b, Show a, Ord a) => Show (PairedInterval b a) Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

data Empty Source #

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

Instances

Instances details
Eq Empty Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Methods

(==) :: Empty -> Empty -> Bool #

(/=) :: Empty -> Empty -> Bool #

Ord Empty Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Methods

compare :: Empty -> Empty -> Ordering #

(<) :: Empty -> Empty -> Bool #

(<=) :: Empty -> Empty -> Bool #

(>) :: Empty -> Empty -> Bool #

(>=) :: Empty -> Empty -> Bool #

max :: Empty -> Empty -> Empty #

min :: Empty -> Empty -> Empty #

Show Empty Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Methods

showsPrec :: Int -> Empty -> ShowS #

show :: Empty -> String #

showList :: [Empty] -> ShowS #

Semigroup Empty Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Methods

(<>) :: Empty -> Empty -> Empty #

sconcat :: NonEmpty Empty -> Empty #

stimes :: Integral b => b -> Empty -> Empty #

Monoid Empty Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Methods

mempty :: Empty #

mappend :: 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 => [PairedInterval b a] -> [Interval a] Source #

Gets the intervals from a list of paired intervals.

equalPairData :: Eq b => ComparativePredicateOf1 (PairedInterval b a) Source #

Tests for equality of the data in a PairedInterval.

toTrivialPair :: Interval a -> PairedInterval Empty a Source #

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).