packages feed

diagrams-lib 1.5.0.1 → 1.5.1

raw patch · 3 files changed

+18/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Diagrams.Trail: instance (GHC.Real.Real n, GHC.Float.Floating n, Linear.Metric.Metric v) => GHC.Base.Semigroup (Diagrams.Located.Located (Diagrams.Trail.Trail' Diagrams.Trail.Line v n))

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+## [v1.5.1](https://github.com/diagrams/diagrams-lib/tree/v1.5.1) (2025-12-02)++- New `Semigroup` instance for located lines (i.e. `Located (Trail'+  Line v n)`), which adds an extra segment from the end of the first+  to the start of the second.+ ## [v1.5.0.1](https://github.com/diagrams/diagrams-lib/tree/v1.5.0.1) (2025-08-25)  - Fix bug in `bezierFindRoot` that caused diagrams to hang when
diagrams-lib.cabal view
@@ -1,5 +1,5 @@ Name:                diagrams-lib-Version:             1.5.0.1+Version:             1.5.1 Synopsis:            Embedded domain-specific language for declarative graphics Description:         Diagrams is a flexible, extensible EDSL for creating                      graphics of many types.  Graphics can be created
src/Diagrams/Trail.hs view
@@ -539,6 +539,17 @@   _Snoc = _Wrapped . _Snoc . bimapping _Unwrapped id   {-# INLINE _Snoc #-} +-- | Compose two Located trails by adding a segment joining the endpoint+--   of the first to the starting point of the second.  Note, if you have+--   two located trails such that the end of the first coincides with the+--   start of the second, this will still add a trivial zero-length segment+--   between them; in that case you are probably better off with something+--   like @mapLoc (<> unLoc t2) t1@.+instance (Real n, Floating n, Metric v)+  => Semigroup (Located (Trail' Line v n)) where+    a@(Loc aLoc aLine) <> b@(Loc _ bLine) =+      Loc aLoc (aLine <> lineFromOffsets [atStart b .-. atEnd a] <> bLine)+ -------------------------------------------------- -- Extracting segments