Copyright | (c) NoviSci Inc 2020 |
---|---|
License | BSD3 |
Maintainer | bsaul@novisci.com |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- data PairedInterval b a
- data Empty
- makePairedInterval :: b -> Interval a -> PairedInterval b a
- getPairData :: PairedInterval b a -> b
- intervals :: Ord a => [PairedInterval b a] -> [Interval a]
- equalPairData :: Eq b => ComparativePredicateOf1 (PairedInterval b a)
- toTrivialPair :: Interval a -> PairedInterval Empty a
- trivialize :: Functor f => f (Interval a) -> f (PairedInterval Empty a)
Documentation
data PairedInterval b a Source #
An Interval a
paired with some other data of type b
.
Instances
Empty is used to trivially lift an Interval a
into a PairedInterval
.
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).