packages feed

equivalence 0.3.4 → 0.3.5

raw patch · 6 files changed

+28/−34 lines, 6 filesdep −test-frameworkdep −test-framework-quickcheck2dep ~basedep ~mtlPVP ok

version bump matches the API change (PVP)

Dependencies removed: test-framework, test-framework-quickcheck2

Dependency ranges changed: base, mtl

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,3 +1,15 @@+0.3.5+-----+* compatibility with GHC 8.8++0.3.4+-----+* MonadFail instance for EquivT++0.3.3+-----+* compatibility with GHC 8.6+ 0.3.2 ----- * add Applicative constraints for backwards compatibility with GHC 7.8
equivalence.cabal view
@@ -1,5 +1,5 @@ Name:            equivalence-Version:         0.3.4+Version:         0.3.5 License:         BSD3 License-File:    LICENSE Author:          Patrick Bahr@@ -34,8 +34,7 @@   Other-Modules:	Data.Equivalence.Monad_Test,Data.Equivalence.Monad, Data.Equivalence.STT   hs-source-dirs:	src testsuite/tests   Build-Depends:        base >= 4, template-haskell, containers, mtl >= 2.0.1, QuickCheck >= 2,-                        test-framework, test-framework-quickcheck2, STMonadTrans >= 0.4.3,-                        transformers >= 0.2, transformers-compat >= 0.3, fail+                        STMonadTrans >= 0.4.3, transformers >= 0.2, transformers-compat >= 0.3, fail  Library   Build-Depends:
src/Data/Equivalence/Monad.hs view
@@ -55,7 +55,6 @@ import Control.Monad.Trans.Error (ErrorT) import Control.Monad.Trans.Except (ExceptT) import Control.Applicative- import qualified Control.Monad.Fail as Fail  
src/Data/Equivalence/STT.hs view
@@ -241,9 +241,9 @@   -{-| This function equates the two given elements. That is, it unions-the equivalence classes of the two elements and combines their-descriptor. The returned entry is the representative of the new+{-| This function equates the two given (representative) elements. That+is, it unions the equivalence classes of the two elements and combines+their descriptor. The returned entry is the representative of the new equivalence class -}  equateEntry :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Entry s c a -> Entry s c a -> STT s m (Entry s c a)@@ -264,7 +264,9 @@           writeSTRef ry dy{entryWeight = wx + wy, entryDesc = mkDesc chx chy}           return repy -      _ -> fail "error on `equateEntry`"+      _ -> error "error on `equateEntry`"+      -- this should not happen as this function is only called by+      -- 'combineEntries', which always uses representative entries   else return  repx  combineEntries :: (Monad m, Applicative m, Ord a)
testsuite/tests/Data/Equivalence/Monad_Test.hs view
@@ -3,8 +3,6 @@  module Data.Equivalence.Monad_Test where -import Test.Framework-import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck hiding ((===))  import Data.Equivalence.Monad@@ -13,29 +11,13 @@ import Data.Set (Set) import qualified Data.Set as Set ++ -------------------------------------------------------------------------------- -- Test Suits -------------------------------------------------------------------------------- -main = defaultMain [tests] -tests = testGroup "Monad" [testProperty "singleton" prop_singleton,-         testProperty "equateAll" prop_equateAll,-         testProperty "combineAll" prop_combineAll,-         testProperty "equate" prop_equate,-         testProperty "combine" prop_combine,-         testProperty "equateOverlap" prop_equateOverlap,-         testProperty "combineOverlap" prop_combineOverlap,-         testProperty "equateAllOverlap" prop_equateAllOverlap,-         testProperty "combineAllOverlap" prop_combineAllOverlap,-         testProperty "removeClass" prop_removeClass,-         testProperty "remove" prop_remove,-         testProperty "removeClass'" prop_removeClass',-         testProperty "remove'" prop_remove',-         testProperty "classes" prop_classes-         ]-- -- run :: (Ord a) => STT s Identity (Equiv s (Set a) a) run :: (Ord v) => (forall s. EquivM s (Set v) v a) -> a run = runEquivM Set.singleton Set.union@@ -172,3 +154,8 @@                  [cx,cy] <- getClasses [x,y]                  eq <- cx === cy                  return (res,eq)+++return []+main = $quickCheckAll+
testsuite/tests/Data_Test.hs view
@@ -1,17 +1,12 @@ module Main where -import Test.Framework import qualified Data.Equivalence.Monad_Test  -------------------------------------------------------------------------------- -- Test Suits -------------------------------------------------------------------------------- -main = defaultMain [tests]--tests = testGroup "Data" [-         Data.Equivalence.Monad_Test.tests-       ]+main = Data.Equivalence.Monad_Test.main  -------------------------------------------------------------------------------- -- Properties