interval-algebra-2.2.0: An implementation of Allen's interval algebra for temporal logic
Copyright(c) NoviSci Inc 2020-2022
TargetRWE 2023
LicenseBSD3
Maintainerbsaul@novisci.com 2020-2022, bbrown@targetrwe.com 2023
Stabilityexperimental
Safe HaskellSafe-Inferred
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
Intervallic (PairedInterval b) 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

Generic (PairedInterval b a) Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

Associated Types

type Rep (PairedInterval b a) :: Type -> Type #

Methods

from :: PairedInterval b a -> Rep (PairedInterval b a) x #

to :: Rep (PairedInterval b a) x -> PairedInterval b a #

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

Defined in IntervalAlgebra.PairedInterval

Methods

put :: PairedInterval b a -> Put #

get :: Get (PairedInterval b a) #

putList :: [PairedInterval b a] -> Put #

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

Defined in IntervalAlgebra.PairedInterval

Methods

rnf :: PairedInterval b a -> () #

type Rep (PairedInterval b a) Source # 
Instance details

Defined in IntervalAlgebra.PairedInterval

type Rep (PairedInterval b a) = D1 ('MetaData "PairedInterval" "IntervalAlgebra.PairedInterval" "interval-algebra-2.2.0-inplace" 'True) (C1 ('MetaCons "PairedInterval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Interval a, b))))

data Empty Source #

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

Constructors

Empty 

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, Functor f) => f (PairedInterval b a) -> f (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).