ClassLaws 0.3.0.0 → 0.3.0.1
raw patch · 3 files changed
+9/−7 lines, 3 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Test.ClassLaws.TestingState: instance [overlap ok] (Bounded s, Enum s, SemanticEq s, SemanticEq a) => SemanticEq (SS s a)
+ Test.ClassLaws.TestingState: instance [overlap ok] (Bounded s, Enum s, SemanticOrd s, SemanticOrd a) => SemanticOrd (SS s a)
Files
- ClassLaws.cabal +1/−1
- src/Control/Monad/State/Class/Laws/Instances.hs +3/−4
- src/Test/ClassLaws/TestingState.hs +5/−2
ClassLaws.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.3.0.0+version: 0.3.0.1 -- A short (one-line) description of the package. synopsis: Stating and checking laws for type class methods
src/Control/Monad/State/Class/Laws/Instances.hs view
@@ -65,17 +65,16 @@ quickLawCheck (undefined::MonadLaw3 () Ordering Bool (SS Bool)) quickLawCheck (undefined::FunctorMonadLaw () Ordering (SS Bool)) --- TODO: fix the class constraints problems (related to ChasingBottoms Data a => SemanticEq a instances) testLawsStatePartialS = do quickLawCheckPartial (undefined::MonadStatePutPut Bool (SS Bool)) quickLawCheckPartial (undefined::MonadStatePutGet Bool (SS Bool)) quickLawCheckPartial (undefined::MonadStateGetPut (SS Bool))- -- quickLawCheckPartial (undefined::MonadStateGetGet Bool Ordering (SS Bool))+ quickLawCheckPartial (undefined::MonadStateGetGet Bool Ordering (SS Bool)) quickLawCheckPartial (undefined::FunctorLaw1 () (SS Bool)) quickLawCheckPartial (undefined::FunctorLaw2 Ordering Bool () (SS Bool))- -- quickLawCheckPartial (undefined::MonadLaw1 Bool () (SS Bool))+ quickLawCheckPartial (undefined::MonadLaw1 Bool () (SS Bool)) quickLawCheckPartial (undefined::MonadLaw2 Ordering (SS Bool))- -- quickLawCheckPartial (undefined::MonadLaw3 () Ordering Bool (SS Bool))+ quickLawCheckPartial (undefined::MonadLaw3 () Ordering Bool (SS Bool)) quickLawCheckPartial (undefined::FunctorMonadLaw () Ordering (SS Bool)) main = do
src/Test/ClassLaws/TestingState.hs view
@@ -248,16 +248,19 @@ ---------------------------------------------------------------------- newtype SS s a = SS {unSS :: State s a}- deriving( Arbitrary, Show, ArbitraryPartial, MonadState s)+ deriving( Arbitrary, Show, ArbitraryPartial, MonadState s+ , SemanticEq, SemanticOrd)+-- deriving instance (Show (Partial a), Show (Partial s), Bounded s, Enum s+-- , SemanticEq a, SemanticEq s) => TestEqual (SS s a) instance ( SemanticEq a, Show (Partial a) , SemanticEq s, Show (Partial s) , Bounded s, Enum s) => TestEqual (SS s a) where testEqual eq _ = testEqPartial (==!) (map unSS eq)+ instance (Enum s, Bounded s, Show (Partial a), Show (Partial s)) => Show (Partial (SS s a)) where show (Partial (SS x)) = show (Partial x)- instance Monad (SS s) where