ideas-math-types 1.0 → 1.1
raw patch · 3 files changed
+10/−5 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Domain.Algebra.Field: infixl 6 |-|
+ Domain.Algebra.Field: infixl 7 |/|
+ Domain.Algebra.Law: infix 1 :==:
+ Domain.Logic.Formula: infixr 2 :<->:
+ Domain.Logic.Formula: infixr 3 :->:
+ Domain.Logic.Formula: infixr 4 :||:
+ Domain.Logic.Formula: infixr 5 :&&:
- Domain.Logic.Formula: Not :: (Logic a) -> Logic a
+ Domain.Logic.Formula: Not :: Logic a -> Logic a
- Domain.Math.Data.Relation: infix 1 .~=.
+ Domain.Math.Data.Relation: infix 1 :>=:
- Domain.Math.Data.WithBool: join :: Monad m => m m a -> m a
+ Domain.Math.Data.WithBool: join :: Monad m => m (m a) -> m a
Files
- CHANGELOG.txt +5/−0
- ideas-math-types.cabal +2/−2
- src/Domain/Math/Data/SquareRoot.hs +3/−3
CHANGELOG.txt view
@@ -1,3 +1,8 @@+Changelog ideas-math-types-1.0 => ideas-math-types-1.1++* adding missing semigroup instances +* ghc-8.7.6 compatibility (including containers library)+ ideas-math-types-1.0 Initial version of the library. Some modules have been released in 2015 as part
ideas-math-types.cabal view
@@ -1,5 +1,5 @@ name: ideas-math-types -version: 1.0 +version: 1.1 synopsis: Common types for mathematical domain reasoners homepage: http://ideas.cs.uu.nl/ description: @@ -22,7 +22,7 @@ extra-source-files: NOTICE.txt, CHANGELOG.txt build-type: Simple cabal-version: >= 1.10 -tested-with: GHC == 7.10.3 +tested-with: GHC == 7.10.3, GHC == 8.6.5 source-repository head type: svn
src/Domain/Math/Data/SquareRoot.hs view
@@ -52,7 +52,7 @@ -- re-establish invariants makeMap :: (Eq a,Num a) => SqMap a -> SqMap a -makeMap = M.filter (/=0) . M.foldWithKey f M.empty +makeMap = M.filter (/=0) . M.foldrWithKey f M.empty where f k a m | a == 0 = m @@ -77,7 +77,7 @@ _ -> let op n a = M.unionWith (+) (f n (fmap (a *) m1)) f i = M.mapKeys (*i) - in makeMap (M.foldWithKey op M.empty m2) + in makeMap (M.foldrWithKey op M.empty m2) recipSqMap :: (Eq a,Fractional a) => SqMap a -> SqMap a recipSqMap m = @@ -196,5 +196,5 @@ (a, b) = (numerator r, denominator r) eval :: Floating a => SquareRoot a -> a -eval (S _ m) = M.foldWithKey f 0 m +eval (S _ m) = M.foldrWithKey f 0 m where f n a b = a * Prelude.sqrt (fromIntegral n) + b