interval-algebra v0.4.0 Release Notes

    • โž• Adds utilities emptyIfNone, emptyIfAny, and emptyIfAll that apply predicates to a list of inputs. If none, any, or all of the inputs meet the predicate, then the empty list is returned. Otherwise, the input is returned unmodified. These functions are generalized to Monoids, so they work on structures other than lists.
    • โž• Adds gapsWithin function to IntervalUtilities module that applies gaps to all intervals in the input list that are non-disjoint from the interval in the first argument.
    • ๐Ÿ›  Fixed bug in combineIntervals where intervals could fail to be combined properly because foldr was being used instead of foldl'.
    • โž• Adds intersect function to IntervalCombinable class that returns the (maybe) intersection of two intervals.
    • โž• Adds relations utility function which returns a list of the IntervalRelations between each consecutive pair of intervals in the input list.
    • ๐Ÿ“‡ Renames in' predicate to within. Also, renames filterIn' to filterWithin.
    • โž• Adds predicate function to IntervalAlgebraic class to map an IntervalRelation to its corresponding predicate function. Also adds predicates to map a set of IntervalRelations to a list of predicate functions.
    • โž• Adds intersection, union, converse, and complement methods to IntervalAlgebraic for taking the respective operation on Set IntervalRelation.
    • Instantiates Bounded, Enum, and Ord for IntervalRelation, so that, for one, interval relations can be ordered and used in Data.Set. Uses the total ordering defined here, though in general, interval relations only have a partial order.
    • ๐Ÿ“‡ Renames composeRelations to the more accurate unionPredicates.
    • โž• Adds <|> as operator for "union"ing ComparativePredicateOf (Interval a), as in starts <|> overlaps === unionPredicates [starts, overlaps].
    • โž• Adds a clip x y function which clips the interval y to the extent of x, provided x and y are not disjoint.