{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreihqix5k3vwdfwmzyzrfksokjjxfuwesjo3mlgn45uxh4z5ye3k4ti",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3ml7t5uavd672"
},
"path": "/t/ann-interval-patterns-0-8-2/14044#post_1",
"publishedAt": "2026-05-06T21:24:06.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"Hackage",
"interval-patterns"
],
"textContent": "There is a new release of `interval-patterns` available.\n\nHackage\n\n### interval-patterns\n\nIntervals, and monoids thereof\n\nThis library aims to make working with intervals ergonomic. All types of extremum are supported, with special pattern synonyms for fine-grained control without sacrificing conciseness or legibility. For example:\n\n\n >>> union (2 :||: 5) (5 :<>: 7)\n One (2 :|>: 7)\n\n >>> union (2 :||: 4) (5 :<>: 7)\n Two (2 :||: 4) (5 :<>: 7)\n\n >>> difference Whole (3 :<>: 4)\n Just (Two (Bottom :|-|: Levitate 3) (Levitate 4 :|-|: Top))\n\n >>> symmetricDifference (1 :<>: 4) (2 :||: 5)\n Just (Two (1 :<>: 2) (4 :||: 5))\n\n\nIt also correctly implements several monoids made from sets of intervals. Notably, the (computable) `Borel` sets are expressible, and form a monoid under `union`. There is also a notion similar to `Map (Interval k) v`, but overlapping intervals are combined using `v`’s `Semigroup` instance, effectively modelling `Layers` of e.g. paint over a surface area.\n\nDo give it a try if you have problems to solve using intervals.",
"title": "[ANN] interval-patterns-0.8.2"
}