!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Masahiro Sakai 2011-2013 BSD-stylemasahiro.sakai@gmail.com provisional;non-portable (CPP, ScopedTypeVariables, DeriveDataTypeable)Safe0ET.Endpoints of intervalsThe intervals (i.e.1 connected and convex subsets) over real numbers R.Lower endpoint (i.e.( greatest lower bound) of the interval. of the empty interval is .! of a left unbounded interval is .; of an interval may or may not be a member of the interval.Upper endpoint (i.e.$ least upper bound) of the interval. of the empty interval is ." of a right unbounded interval is .; of an interval may or may not be a member of the interval.q of the interval and whether it is included in the interval. The result is convenient to use as an argument for .q of the interval and whether it is included in the interval. The result is convenient to use as an argument for .smart constructor for closed interval [l,u]!left-open right-closed interval (l,u] !left-closed right-open interval [l, u) open interval (l, u) whole real number line (-", ") empty (contradicting) interval singleton set x,xintersection of two intervals$intersection of a list of intervals. Since 0.6.0convex hull of two intervals#convex hull of a list of intervals. Since 0.6.0Is the interval empty?Is the element in the interval?#Is the element not in the interval?Is this a subset? (i1 `` i2) tells whether i1 is a subset of i2.Is this a proper subset? (i.e. a subset but not equal).1Does the union of two range form a connected set? Since 1.3.07Width of a interval. Width of an unbounded interval is  undefined.Bpick up an element from the interval if the interval is not empty.: returns the simplest rational number within the interval.A rational number y is said to be simpler than another y' if ( y) <=  ( y'), and y <=  y'. (see also ) Since 0.4.0mapMonotonic f i is the image of i under f, where f$ must be a strict monotone function.For all x in X, y in Y. x  y?For all x in X, y in Y. x  y?For all x in X, y in Y. x  y?For all x in X, y in Y. x  y? Since 1.0.1 For all x in X, y in Y. x  y?!For all x in X, y in Y. x  y?"Does there exist an x in X, y in Y such that x  y?#Does there exist an x in X, y in Y such that x  y? Since 1.0.0$Does there exist an x in X, y in Y such that x  y?%Does there exist an x in X, y in Y such that x  y? Since 1.0.0&Does there exist an x in X, y in Y such that x  y? Since 1.0.0'Does there exist an x in X, y in Y such that x  y? Since 1.0.0(Does there exist an x in X, y in Y such that x  y? Since 1.0.1)Does there exist an x in X, y in Y such that x  y? Since 1.0.1*Does there exist an x in X, y in Y such that x  y?+Does there exist an x in X, y in Y such that x  y?,Does there exist an x in X, y in Y such that x  y? Since 1.0.0-Does there exist an x in X, y in Y such that x  y? Since 1.0.0I&lower bound and whether it is included&upper bound and whether it is included lower bound l upper bound u lower bound l upper bound u  lower bound l upper bound u  lower bound l upper bound u  !"#$%&'()*+,-./0123456789:5  !"#$%&'()*+,-.  !"$&*+(#%',-)H  !"#$%&'()*+,-./0123456789:55 5 54444 4!4"4#4$4%4&4'4(4)4*4+4,4-4(c) Masahiro Sakai 2016 BSD-stylemasahiro.sakai@gmail.com provisionalUnon-portable (CPP, ScopedTypeVariables, TypeFamilies, DeriveDataTypeable, MultiWayIf) Trustworthy 0DERT\<)A set comprising zero or more non-empty,  disconnected intervals.MAny connected intervals are merged together, and empty intervals are ignored.=whole real number line (-", ")>empty interval set?single interval@Is the interval set empty?A#Is the element in the interval set?B'Is the element not in the interval set?CIs this a subset? (is1 `C` is2) tells whether is1 is a subset of is2.DIs this a proper subset? (i.e. a subset but not equal).E"convex hull of a set of intervals.FComplement the interval set.G,Insert a new interval into the interval set.H)Delete an interval from the interval set.Iunion of two interval setsJ union of a list of interval setsK!intersection of two interval setsL'intersection of a list of interval setsMdifference of two interval setsN.Build a interval set from a list of intervals.O3Build a map from an ascending list of intervals.  The precondition is not checked.P0Convert a interval set into a list of intervals.QCConvert a interval set into a list of intervals in ascending order.RDConvert a interval set into a list of intervals in descending order.2<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab<=>?@ABCDEFGHIJKLMNOPQR<=>?@ABCDEFGHIJKLMNPQRO1<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab(c) Masahiro Sakai 2016 BSD-stylemasahiro.sakai@gmail.com provisionalqnon-portable (CPP, ScopedTypeVariables, TypeFamilies, DeriveDataTypeable, MultiWayIf, GeneralizedNewtypeDeriving) Trustworthy 0DEIRT\*d<A Map from non-empty, disjoint intervals over k to values a.Unlike <, dg never merge adjacent mappings, even if adjacent intervals are connected and mapped to the same value.eFind the value at a key. Calls # when the element can not be found.fSame as z.gIs the map empty?h)Is the key a member of the map? See also i.i-Is the key not a member of the map? See also h.j%Lookup the value at a key in the map.4The function will return the corresponding value as ( value), or  if the key isn't in the map.kThe expression (k def k map) returns the value at key k or returns default value def! when the key is not in the map.lconvex hull of key intervals.mThe empty map.n(The map that maps whole range of k to a.oA map with a single interval.pinsert a new key and value in the map. If the key is already present in the map, the associated value is replaced with the supplied value.q<Insert with a function, combining new value and old value. q f key value mp- will insert the pair (interval, value) into mp\. If the interval overlaps with existing entries, the value for the entry is replace with (f new_value old_value).rDelete an interval and its value from the map. When the interval does not overlap with the map, the original map is returned.sUpdate a value at a specific interval with the result of the provided function. When the interval does not overlatp with the map, the original map is returned.tThe expression (t f i map) updates the value x at i (if it is in the map). If (f x) is %, the element is deleted. If it is ( y ), the key i is bound to the new value y.uThe expression (u f i map) alters the value x at i, or absence thereof. u7 can be used to insert, delete, or update a value in a d.vThe expression (v t1 t2!) takes the left-biased union of t1 and t2. It prefers t1' when overlapping keys are encountered,w Union with a combining function.x!The union of a list of maps: (x ==  v m).y=The union of a list of maps, with a combining operation: (y f ==  (w f) m).z@Return elements of the first map not existing in the second map.{[Intersection of two maps. Return data in the first map for the keys existing in both maps.|'Intersection with a combining function.}*Map a function over all values in the map.~mapKeys f s! is the map obtained by applying f to each key of s. f6 must be strictly monotonic. That is, for any values x and y, if x < y then f x < f y.DReturn all elements of the map in the ascending order of their keys.>Return all keys of the map in ascending order. Subject to list An alias for A. Return all key/value pairs in the map in ascending key order. The set of all keys of the map..Convert the map to a list of key/value pairs. TConvert the map to a list of key/value pairs where the keys are in ascending order. UConvert the map to a list of key/value pairs where the keys are in descending order. Build a map from a list of key/value pairs. If the list contains more than one value for the same key, the last value for the key is retained.EBuild a map from a list of key/value pairs with a combining function..Filter all values that satisfy some predicate.The expression ( i map) is a triple (map1,map2,map3) where the keys in map1 are smaller than i, the keys in map2 are included in i, and the keys in map3 are larger than i.This function is defined as ( =  (==)).The expression ( f t1 t2 ) returns  if all keys in t1 are in tree t2 , and when f returns + when applied to their respective values. DIs this a proper submap? (ie. a submap but not equal). Defined as ( =  (==)).HIs this a proper submap? (ie. a submap but not equal). The expression ( f m1 m2 ) returns  when m1 and m2 are not equal, all keys in m1 are in m2 , and when f returns * when applied to their respective values.@d    efghijk lmnopqrstuvwxyz{|}~3d efghijklmnopqrstuvwxyz{|}~>d    efghijk lmnopqrstuvwxyz{|}~e9 f9 (c) Masahiro Sakai 2016 BSD-stylemasahiro.sakai@gmail.com provisionalportableSafe2defghijklmnopqrstuvwxyz{|}~+defghijklnmopqrstuvwxy{|z}~(c) Masahiro Sakai 2016 BSD-stylemasahiro.sakai@gmail.com provisional*non-portable (BangPatterns, TupleSections)SafeL (The map that maps whole range of k to a.A map with a single interval.insert a new key and value in the map. If the key is already present in the map, the associated value is replaced with the supplied value.<Insert with a function, combining new value and old value.  f key value mp- will insert the pair (interval, value) into mp\. If the interval overlaps with existing entries, the value for the entry is replace with (f new_value old_value).Update a value at a specific interval with the result of the provided function. When the interval does not overlatp with the map, the original map is returned.The expression ( f i map) updates the value x at i (if it is in the map). If (f x) is %, the element is deleted. If it is ( y ), the key i is bound to the new value y.The expression ( f i map) alters the value x at i, or absence thereof. 7 can be used to insert, delete, or update a value in a d. Union with a combining function.=The union of a list of maps, with a combining operation: ( f ==  ( f) m).'Intersection with a combining function.*Map a function over all values in the map.Build a map from a list of key/value pairs. If the list contains more than one value for the same key, the last value for the key is retained.EBuild a map from a list of key/value pairs with a combining function. 2defghijklmrvxz{~+defghijklmrvx{z~ (c) Masahiro Sakai 2011-2014 BSD-stylemasahiro.sakai@gmail.com provisional6non-portable (ScopedTypeVariables, DeriveDataTypeable)Safe0T0The intervals (i.e.. connected and convex subsets) over integers (Z).Lower endpoint (i.e.( greatest lower bound) of the interval. of the empty interval is .! of a left unbounded interval is .; of an interval may or may not be a member of the interval.Upper endpoint (i.e.$ least upper bound) of the interval. of the empty interval is ." of a right unbounded interval is ., of an interval is a member of the interval.q of the interval and whether it is included in the interval. The result is convenient to use as an argument for .q of the interval and whether it is included in the interval. The result is convenient to use as an argument for .smart constructor for closed interval [l,u]!left-open right-closed interval (l,u]!left-closed right-open interval [l, u)open interval (l, u)whole real number line (-", ")empty (contradicting) intervalsingleton set x,xintersection of two intervals$intersection of a list of intervals.convex hull of two intervals#convex hull of a list of intervals.mapMonotonic f i is the image of i under f, where f$ must be a strict monotone function.Is the interval empty?Is the element in the interval?#Is the element not in the interval?Is this a subset? (i1 `` i2) tells whether i1 is a subset of i2.Is this a proper subset? (i.e. a subset but not equal).7Width of a interval. Width of an unbounded interval is  undefined.Bpick up an element from the interval if the interval is not empty.: returns the simplest rational number within the interval. An integer y is said to be simpler than another y' if  y <=  y' (see also approxRational and )For all x in X, y in Y. x  y?For all x in X, y in Y. x  y?For all x in X, y in Y. x  y?For all x in X, y in Y. x  y?For all x in X, y in Y. x  y?For all x in X, y in Y. x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Convert the interval to  data type.Conversion from  data type.Given a  I over R, compute the smallest  J such that I " J.Given a  I over R, compute the largest  J such that J " I.C&lower bound and whether it is included&upper bound and whether it is included lower bound l upper bound u lower bound l upper bound u lower bound l upper bound u lower bound l upper bound u !"#70B !"#5555444444444444444444$      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeDFfGghiHjIkJlmnopqrMNOKstuvwxyFfghijklmKsz     " {#$%&'()*+,-./01234|}~Ca*data-interval-1.3.0-2pB2FYdYdIGC5qw1nHvfAq Data.IntervalData.IntervalSetData.IntervalMap.LazyData.IntervalMap.StrictData.IntegerIntervalData.IntervalMap.BaseEndPointInterval lowerBound upperBound lowerBound' upperBound'interval<=..<=<..<=<=..<<..<wholeempty singleton intersection intersectionshullhullsnullmember notMember isSubsetOfisProperSubsetOf isConnectedwidthpickupsimplestRationalWithin mapMonotonic=!>!=?>?>=??>??$fFractionalInterval $fNumInterval$fDataInterval$fReadInterval$fShowInterval$fBoundedLatticeInterval $fBoundedMeetSemiLatticeInterval $fBoundedJoinSemiLatticeInterval$fLatticeInterval$fMeetSemiLatticeInterval$fJoinSemiLatticeInterval$fHashableInterval$fNFDataInterval $fEqInterval IntervalSetspan complementinsertdeleteunionunions differencefromList fromAscListtoList toAscList toDescList$fIsListIntervalSet$fFractionalIntervalSet$fNumIntervalSet$fSemigroupIntervalSet$fMonoidIntervalSet$fBoundedLatticeIntervalSet#$fBoundedMeetSemiLatticeIntervalSet#$fBoundedJoinSemiLatticeIntervalSet$fLatticeIntervalSet$fMeetSemiLatticeIntervalSet$fJoinSemiLatticeIntervalSet$fHashableIntervalSet$fNFDataIntervalSet$fDataIntervalSet$fReadIntervalSet$fShowIntervalSet$fEqIntervalSet IntervalMap!\\lookupfindWithDefault insertWithadjustupdatealter unionWith unionsWithintersectionWithmapmapKeysMonotonicelemskeysassocskeysSet fromListWithfiltersplit isSubmapOf isSubmapOfByisProperSubmapOfisProperSubmapOfByIntegerIntervalsimplestIntegerWithin toInterval fromIntervalfromIntervalOverfromIntervalUnder$fNumIntegerInterval$fDataIntegerInterval$fReadIntegerInterval$fShowIntegerInterval$fBoundedLatticeIntegerInterval'$fBoundedMeetSemiLatticeIntegerInterval'$fBoundedJoinSemiLatticeIntegerInterval$fLatticeIntegerInterval $fMeetSemiLatticeIntegerInterval $fJoinSemiLatticeIntegerInterval$fHashableIntegerInterval$fNFDataIntegerInterval$fEqIntegerInterval-extended-reals-0.2.2.0-3riGHdnL1RUIRNF61zeFUiData.ExtendedRealPosInfNegInfbaseGHC.NumabsGHC.Real numerator denominator Data.RatioapproxRationalghc-prim GHC.Classes<<===/=>=>intervalConstrintervalDataType isSingletonappPrec rangeOpPrec scaleIntervalcmpUBcmpLB scaleInf' scaleEndPointmulInf'recipLBrecipUB isInfiniteisFiniteinfExtendedFinitefromListConstr setDataTypelift1lift2 fromAscList' splitLookupLE compareLBupTodownToGHC.ErrerrorGHC.BaseJustNothing Data.Foldablefoldl GHC.TypesTrueLB mapDataTypelookupInterval$fTraversableIntervalMap$fFoldableIntervalMap$fFunctorIntervalMap$fOrdLB$fIsListIntervalMap$fSemigroupIntervalMap$fMonoidIntervalMap$fHashableIntervalMap$fNFDataIntervalMap$fDataIntervalMap$fReadIntervalMap$fShowIntervalMap