packages feed

diagrams-core 1.5.1 → 1.5.1.1

raw patch · 5 files changed

+16/−14 lines, 5 filesdep ~basedep ~containersdep ~lensPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, containers, lens, linear, monoid-extras

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+## [v1.5.1.1](https://github.com/diagrams/diagrams-core/tree/v1.5.1.1) (2023-11-15)++* Allow `base-4.19` and test on GHC 9.8+* Fix more warnings+ ## [v1.5.1](https://github.com/diagrams/diagrams-core/tree/v1.5.1) (2023-05-11)  * Allow `base-4.18` and test on GHC 9.6 (thanks to @sergv)
README.markdown view
@@ -1,4 +1,4 @@-[![Build Status](https://travis-ci.org/diagrams/diagrams-core.png?branch=master)](http://travis-ci.org/diagrams/diagrams-core)+[![Build Status](https://github.com/diagrams/diagrams-core/actions/workflows/haskell-ci.yml/badge.svg)](https://github.com/diagrams/diagrams-core/actions/workflows/haskell-ci.yml)  The core modules defining the basic data structures and algorithms for [diagrams](http://projects.haskell.org/diagrams), a Haskell embedded
diagrams-core.cabal view
@@ -1,5 +1,5 @@ Name:                diagrams-core-Version:             1.5.1+Version:             1.5.1.1 Synopsis:            Core libraries for diagrams EDSL Description:         The core modules underlying diagrams,                      an embedded domain-specific language@@ -15,7 +15,7 @@ Cabal-version:       1.18 Extra-source-files:  diagrams/*.svg extra-doc-files:     diagrams/*.svg, CHANGELOG.md, README.markdown-Tested-with:         GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.4 || ==9.4.1+Tested-with:         GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.7 || ==9.6.3 || ==9.8.1 Source-repository head   type:     git   location: git://github.com/diagrams/diagrams-core.git@@ -36,7 +36,7 @@                        Diagrams.Core.Types,                        Diagrams.Core.V -  Build-depends:       base >= 4.11 && < 4.19,+  Build-depends:       base >= 4.11 && < 4.20,                        containers >= 0.4.2 && < 0.7,                        unordered-containers >= 0.2 && < 0.3,                        semigroups >= 0.8.4 && < 0.21,
src/Diagrams/Core/Measure.hs view
@@ -126,7 +126,6 @@  instance Monoid a => Monoid (Measured n a) where   mempty  = pure mempty-  mappend = liftA2 mappend  instance Distributive (Measured n) where   distribute a = Measured $ \x -> fmap (\(Measured m) -> m x) a
src/Diagrams/Core/Transform.hs view
@@ -6,10 +6,9 @@ {-# LANGUAGE ScopedTypeVariables        #-} {-# LANGUAGE TypeFamilies               #-} {-# LANGUAGE TypeOperators              #-}-{-# LANGUAGE TypeSynonymInstances       #-} {-# LANGUAGE UndecidableInstances       #-}-{-# OPTIONS_GHC -fno-warn-unused-imports       #-}------------------------------------------------------------------------------+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+ -- | -- Module      :  Diagrams.Core.Transform -- Copyright   :  (c) 2011-2015 diagrams-core team (see LICENSE)@@ -232,21 +231,20 @@  -- Remove the nth element from a list remove :: Int -> [a] -> [a]-remove n xs = ys ++ tail zs+remove n xs = ys ++ zs   where-    (ys, zs) = splitAt n xs+    (ys, _ : zs) = splitAt n xs --- Minor matrix of cofactore C(i,j)+-- Minor matrix of cofactor C(i,j) minor :: Int -> Int -> [[a]] -> [[a]] minor i j xs = remove j $ map (remove i) xs  -- The determinant of a square matrix represented as a list of lists -- representing column vectors, that is [column]. det :: Num a => [[a]] -> a-det (a:[]) = head a-det m = sum [(-1)^i * (c1 !! i) * det (minor i 0 m) | i <- [0 .. (n-1)]]+det [a : _] = a+det m@(c1 : _) = sum [(-1) ^ i * (c1 !! i) * det (minor i 0 m) | i <- [0 .. (n - 1)]]   where-    c1 = head m     n = length m  -- | Convert a vector v to a list of scalars.