External Publication
Visit Post

[ANN] interval-patterns-0.8.2

Haskell Community [Unofficial] May 11, 2026
Source
I wasn’t suggesting anything concrete - jusy musing on an old idea I never quite got working. The main interpretation of a negative interval was as a negative (higher-kinded) number and then treated as a negative space (in my case). A mask over the interval was the practical idea, so interval 2 3 + interval 0 4 = interval 0 4 interval 2 3 + interval 4 0 = interval 4 0 in a convex hull union interpretation. I didn’t imply that code needs changing. I couldn’t quite make it work. The main reason for my numhask-space library is to accomodate higher-kinded intervals, aka a rectangle composed of two intervals (interval 2 3, interval 0 4) and then unoin to calculate bounding rectangles (convex hulls) on 2d shapes for a chart library. A point or a surface doesn’t have a valid ord instance - you need a lattice approach - which is heading towards a pretty esoteric requirement. The main idea I had with the interval-patterns api is whether you could use left and right associated operators, so So union (2 :||: 5) (5 :<>:7) becomes ⟦2 5⟧ ∪ ⟪5 7⟫ = ⟦2 7⟫ The symbols attach to the numbers ⟦2 5⟧ is function application and hence a blank.

Discussion in the ATmosphere

Loading comments...