polysemy-test 0.3.0.2 → 0.3.1.0
raw patch · 4 files changed
+162/−17 lines, 4 filesdep ~pathdep ~path-iodep ~polysemyPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: path, path-io, polysemy, polysemy-plugin
API changes (from Hackage documentation)
+ Polysemy.Test: assertEq :: forall a m r. Monad m => Eq a => Show a => HasCallStack => Member (Hedgehog m) r => a -> a -> Sem r ()
+ Polysemy.Test: assertNeq :: forall a m r. Monad m => Eq a => Show a => HasCallStack => Member (Hedgehog m) r => a -> a -> Sem r ()
Files
- Changelog.md +2/−1
- lib/Polysemy/Test.hs +4/−0
- lib/Polysemy/Test/Hedgehog.hs +28/−0
- polysemy-test.cabal +128/−16
Changelog.md view
@@ -1,6 +1,7 @@-# 0.4.0.0+# 0.3.1.0 * Add Hedgehog assertion combinators for the difference between numeric values.+* Add `assertEq` / `assertNeq` as prefix synonyms for `(===)` / `(/==)`. # 0.3.0.0
lib/Polysemy/Test.hs view
@@ -17,7 +17,9 @@ module Polysemy.Test.Data.Hedgehog, assert, (===),+ assertEq, (/==),+ assertNeq, assertRight, assertRight2, assertRight3,@@ -57,8 +59,10 @@ assert, assertClose, assertCloseBy,+ assertEq, assertJust, assertLeft,+ assertNeq, assertRight, assertRight2, assertRight3,
lib/Polysemy/Test/Hedgehog.hs view
@@ -67,6 +67,20 @@ infix 4 /== +-- |Prefix variant of '(===)'.+assertEq ::+ ∀ a m r .+ Monad m =>+ Eq a =>+ Show a =>+ HasCallStack =>+ Member (Hedgehog m) r =>+ a ->+ a ->+ Sem r ()+assertEq a b =+ withFrozenCallStack $ liftH (a Native.=== b)+ -- |Embeds 'Hedgehog./=='. -- -- >>> 5 /== 5@@ -85,6 +99,20 @@ a -> Sem r () a /== b =+ withFrozenCallStack $ liftH (a Native./== b)++-- |Prefix variant of '(===)'.+assertNeq ::+ ∀ a m r .+ Monad m =>+ Eq a =>+ Show a =>+ HasCallStack =>+ Member (Hedgehog m) r =>+ a ->+ a ->+ Sem r ()+assertNeq a b = withFrozenCallStack $ liftH (a Native./== b) -- |Embeds 'Hedgehog.evalEither'.
polysemy-test.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.34.2.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: polysemy-test-version: 0.3.0.2+version: 0.3.1.0 synopsis: Polysemy effects for testing description: Please see the README on Github at <https://github.com/tek/polysemy-test> category: Test@@ -36,18 +36,74 @@ Paths_polysemy_test hs-source-dirs: lib- default-extensions: AllowAmbiguousTypes ApplicativeDo BangPatterns BinaryLiterals BlockArguments ConstraintKinds DataKinds DefaultSignatures DeriveAnyClass DeriveDataTypeable DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable DerivingStrategies DisambiguateRecordFields DoAndIfThenElse DuplicateRecordFields EmptyDataDecls ExistentialQuantification FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving InstanceSigs KindSignatures LambdaCase LiberalTypeSynonyms MultiParamTypeClasses MultiWayIf NamedFieldPuns OverloadedStrings OverloadedLists PackageImports PartialTypeSignatures PatternGuards PatternSynonyms PolyKinds QuantifiedConstraints QuasiQuotes RankNTypes RecordWildCards RecursiveDo ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeApplications TypeFamilies TypeFamilyDependencies TypeOperators TypeSynonymInstances UndecidableInstances UnicodeSyntax ViewPatterns+ default-extensions:+ AllowAmbiguousTypes+ ApplicativeDo+ BangPatterns+ BinaryLiterals+ BlockArguments+ ConstraintKinds+ DataKinds+ DefaultSignatures+ DeriveAnyClass+ DeriveDataTypeable+ DeriveFoldable+ DeriveFunctor+ DeriveGeneric+ DeriveTraversable+ DerivingStrategies+ DisambiguateRecordFields+ DoAndIfThenElse+ DuplicateRecordFields+ EmptyDataDecls+ ExistentialQuantification+ FlexibleContexts+ FlexibleInstances+ FunctionalDependencies+ GADTs+ GeneralizedNewtypeDeriving+ InstanceSigs+ KindSignatures+ LambdaCase+ LiberalTypeSynonyms+ MultiParamTypeClasses+ MultiWayIf+ NamedFieldPuns+ OverloadedStrings+ OverloadedLists+ PackageImports+ PartialTypeSignatures+ PatternGuards+ PatternSynonyms+ PolyKinds+ QuantifiedConstraints+ QuasiQuotes+ RankNTypes+ RecordWildCards+ RecursiveDo+ ScopedTypeVariables+ StandaloneDeriving+ TemplateHaskell+ TupleSections+ TypeApplications+ TypeFamilies+ TypeFamilyDependencies+ TypeOperators+ TypeSynonymInstances+ UndecidableInstances+ UnicodeSyntax+ ViewPatterns ghc-options: -Wall -fplugin=Polysemy.Plugin -O2 -flate-specialise -fspecialise-aggressively build-depends:- base >=4 && <5+ base ==4.* , containers , either , hedgehog >=1.0.2 && <1.1- , path >=0.8 && <0.9- , path-io >=0.3.1 && <0.4- , polysemy >=1.3 && <1.5- , polysemy-plugin >=0.2.5 && <0.3- , relude >=0.7 && <0.8+ , path >=0.7+ , path-io >=0.2+ , polysemy >=1.3 && <1.6+ , polysemy-plugin >=0.2.5+ , relude ==0.7.* , string-interpolate >=0.1 && <0.4 , tasty >=1.2.3 && <1.3 , tasty-hedgehog >=1 && <1.1@@ -67,19 +123,75 @@ Paths_polysemy_test hs-source-dirs: test- default-extensions: AllowAmbiguousTypes ApplicativeDo BangPatterns BinaryLiterals BlockArguments ConstraintKinds DataKinds DefaultSignatures DeriveAnyClass DeriveDataTypeable DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable DerivingStrategies DisambiguateRecordFields DoAndIfThenElse DuplicateRecordFields EmptyDataDecls ExistentialQuantification FlexibleContexts FlexibleInstances FunctionalDependencies GADTs GeneralizedNewtypeDeriving InstanceSigs KindSignatures LambdaCase LiberalTypeSynonyms MultiParamTypeClasses MultiWayIf NamedFieldPuns OverloadedStrings OverloadedLists PackageImports PartialTypeSignatures PatternGuards PatternSynonyms PolyKinds QuantifiedConstraints QuasiQuotes RankNTypes RecordWildCards RecursiveDo ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeApplications TypeFamilies TypeFamilyDependencies TypeOperators TypeSynonymInstances UndecidableInstances UnicodeSyntax ViewPatterns+ default-extensions:+ AllowAmbiguousTypes+ ApplicativeDo+ BangPatterns+ BinaryLiterals+ BlockArguments+ ConstraintKinds+ DataKinds+ DefaultSignatures+ DeriveAnyClass+ DeriveDataTypeable+ DeriveFoldable+ DeriveFunctor+ DeriveGeneric+ DeriveTraversable+ DerivingStrategies+ DisambiguateRecordFields+ DoAndIfThenElse+ DuplicateRecordFields+ EmptyDataDecls+ ExistentialQuantification+ FlexibleContexts+ FlexibleInstances+ FunctionalDependencies+ GADTs+ GeneralizedNewtypeDeriving+ InstanceSigs+ KindSignatures+ LambdaCase+ LiberalTypeSynonyms+ MultiParamTypeClasses+ MultiWayIf+ NamedFieldPuns+ OverloadedStrings+ OverloadedLists+ PackageImports+ PartialTypeSignatures+ PatternGuards+ PatternSynonyms+ PolyKinds+ QuantifiedConstraints+ QuasiQuotes+ RankNTypes+ RecordWildCards+ RecursiveDo+ ScopedTypeVariables+ StandaloneDeriving+ TemplateHaskell+ TupleSections+ TypeApplications+ TypeFamilies+ TypeFamilyDependencies+ TypeOperators+ TypeSynonymInstances+ UndecidableInstances+ UnicodeSyntax+ ViewPatterns ghc-options: -Wall -fplugin=Polysemy.Plugin -O2 -flate-specialise -fspecialise-aggressively -threaded -rtsopts -with-rtsopts=-N build-depends:- base >=4 && <5+ base ==4.* , containers , either , hedgehog >=1.0.2 && <1.1- , path >=0.8 && <0.9- , path-io >=0.3.1 && <0.4- , polysemy >=1.3 && <1.5- , polysemy-plugin >=0.2.5 && <0.3+ , path >=0.7+ , path-io >=0.2+ , polysemy >=1.3 && <1.6+ , polysemy-plugin >=0.2.5 , polysemy-test- , relude >=0.7 && <0.8+ , relude ==0.7.* , string-interpolate >=0.1 && <0.4 , tasty , tasty-hedgehog >=1 && <1.1