packages feed

leancheck 0.9.3 → 0.9.4

raw patch · 19 files changed

+531/−1140 lines, 19 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Int1
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Int2
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Int3
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Int4
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat1
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat2
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat3
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat4
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat5
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat6
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Nat7
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Natural
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Word1
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Word2
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Word3
- Test.LeanCheck.Utils.Types: instance GHC.Arr.Ix Test.LeanCheck.Utils.Types.Word4
+ Test.LeanCheck.Error: (!==!) :: Eq a => a -> a -> Bool
+ Test.LeanCheck.Error: (?==?) :: Eq a => a -> a -> Bool
+ Test.LeanCheck.Error: anyErrorToLeft :: a -> Either String a
+ Test.LeanCheck.Error: errorToLeft :: a -> Either String a
+ Test.LeanCheck.Error: infix 4 !==!
+ Test.LeanCheck.Function.List: areEqualFor :: (Listable a, Eq b) => Int -> (a -> b) -> (a -> b) -> Bool
+ Test.LeanCheck.Function.List: compareFor :: (Listable a, Ord b) => Int -> (a -> b) -> (a -> b) -> Ordering
+ Test.LeanCheck.Function.List: funToList :: Listable a => (a -> b) -> [b]
+ Test.LeanCheck.Function.List: funToListEither :: Listable a => (a -> b) -> [Either String b]
+ Test.LeanCheck.Function.List: funToListMaybe :: Listable a => (a -> b) -> [Maybe b]
+ Test.LeanCheck.Function.Ord: instance (Test.LeanCheck.Core.Listable a, GHC.Classes.Ord b) => GHC.Classes.Ord (a -> b)
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Int1
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Int2
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Int3
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Int4
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat1
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat2
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat3
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat4
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat5
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat6
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Nat7
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Natural
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Word1
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Word2
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Word3
+ Test.LeanCheck.Utils.Types: instance GHC.Ix.Ix Test.LeanCheck.Utils.Types.Word4

Files

.travis.yml view
@@ -1,6 +1,6 @@ # .travis.yml file for LeanCheck #-# Copyright:   (c) 2017-2020 Rudy Matela+# Copyright:   (c) 2017-2021 Rudy Matela # License:     3-Clause BSD  (see the file LICENSE) # Maintainer:  Rudy Matela <rudy@matela.com.br> @@ -23,6 +23,9 @@ - ghc --version - cabal --version - haddock --version+- du -hd3 ~/.cabal ~/.ghc || true+- du -hd4 ~/.stack || true+- rm -f ~/.cabal/config && cabal update # Download and unpack the stack executable # "Once Travis whitelists the stack.dev files," simply include stack in the # addons section. -- https://docs.haskellstack.org/en/stable/travis_ci/@@ -32,6 +35,7 @@ - stack config set system-ghc --global true - stack --version + script: - make && make test - make haddock@@ -41,17 +45,21 @@  matrix:   allow_failures:-  - ghc: 'head'+  - env:                   GHCVER=head        CABALVER=head    STACKVER=nightly-2021-04-06+  - env:                   GHCVER=9.0.1       CABALVER=head    STACKVER=nightly-2021-04-06   include:   - ghc: 'head'-    env:                   GHCVER=head         CABALVER=head   STACKVER=nightly-2020-03-28-    addons: {apt: {packages: [ghc-head,   cabal-install-head], sources: hvr-ghc}}+    env:                   GHCVER=head        CABALVER=head    STACKVER=nightly-2021-04-06+    addons: {apt: {packages: [ghc-head,  cabal-install-head],  sources: hvr-ghc}}+  - ghc: '9.0'+    env:                   GHCVER=9.0.1       CABALVER=head    STACKVER=nightly-2021-04-06+    addons: {apt: {packages: [ghc-9.0.1, cabal-install-head],  sources: hvr-ghc}}   - ghc: '8.10'-    env:                   GHCVER=8.10.1       CABALVER=3.2    STACKVER=nightly-2020-03-28-    addons: {apt: {packages: [ghc-8.10.1, cabal-install-3.2],  sources: hvr-ghc}}+    env:                   GHCVER=8.10.4       CABALVER=3.2    STACKVER=lts-17.9+    addons: {apt: {packages: [ghc-8.10.4, cabal-install-3.2],  sources: hvr-ghc}}   - ghc: '8.8'-    env:                   GHCVER=8.8.3        CABALVER=3.0    STACKVER=lts-15.5-    addons: {apt: {packages: [ghc-8.8.3,  cabal-install-3.0],  sources: hvr-ghc}}+    env:                   GHCVER=8.8.4        CABALVER=3.0    STACKVER=lts-16.31+    addons: {apt: {packages: [ghc-8.8.4,  cabal-install-3.0],  sources: hvr-ghc}}   - ghc: '8.6'     env:                   GHCVER=8.6.5        CABALVER=2.4    STACKVER=lts-14.27     addons: {apt: {packages: [ghc-8.6.5,  cabal-install-2.4],  sources: hvr-ghc}}
Makefile view
@@ -74,8 +74,7 @@ 	rm -f bench/tiers-4cases.hs 	rm -f $(TESTS) $(BENCHS) $(EGS) mk/toplibs -full-clean: clean-	rm -rf .stack-work+full-clean: clean clean-cabal clean-stack 	rm -f tags TAGS  ghci: mk/All.ghci@@ -105,14 +104,20 @@ test-via-stack: 	stack test -legacy-test: # needs ghc-8.2 .. ghc-7.8 installed as such-	make clean  &&  make test GHC=ghc-8.2 -j-	make clean  &&  make test GHC=ghc-8.0 -j-	make clean  &&  make test GHC=ghc-7.10 -j-	make clean  &&  make test GHC=ghc-7.8 -j+legacy-test: # needs ghc-8.8 .. ghc-7.8 installed as such+	make clean  &&  make test -j GHC=ghc-8.8+	make clean  &&  make test -j GHC=ghc-8.6+	make clean  &&  make test -j GHC=ghc-8.4+	make clean  &&  make test -j GHC=ghc-8.2+	make clean  &&  make test -j GHC=ghc-8.0+	make clean  &&  make test -j GHC=ghc-7.10+	make clean  &&  make test -j GHC=ghc-7.8 	make clean  &&  make test -j  legacy-test-via-cabal: # needs similarly named cabal wrappers+	cabal clean  &&  cabal-ghc-8.8  configure  &&  cabal-ghc-8.8  test+	cabal clean  &&  cabal-ghc-8.6  configure  &&  cabal-ghc-8.6  test+	cabal clean  &&  cabal-ghc-8.4  configure  &&  cabal-ghc-8.4  test 	cabal clean  &&  cabal-ghc-8.2  configure  &&  cabal-ghc-8.2  test 	cabal clean  &&  cabal-ghc-8.0  configure  &&  cabal-ghc-8.0  test 	cabal clean  &&  cabal-ghc-7.10 configure  &&  cabal-ghc-7.10 test@@ -327,7 +332,7 @@ 	$< "Int->Int->Int->Int"     4 | diff -rud test/diff/tiers-$*-Int-Int-Int-Int.out - 	$< "Bool->Bool->Bool->Bool"   | diff -rud test/diff/tiers-$*-Bool-Bool-Bool-Bool.out - 	# functions of lists-	$< "[Bool]->[Bool]" 6 | diff -rud test/diff/tiers-$*-Bools-Bools.out -+	$< "[Bool]->[Bool]" 5 | diff -rud test/diff/tiers-$*-Bools-Bools.out - 	$< "[Nat]->[Nat]"   6 | diff -rud test/diff/tiers-$*-Nats-Nats.out   - 	$< "[Int]->[Int]"   6 | diff -rud test/diff/tiers-$*-Ints-Ints.out   - 	# more functions@@ -361,7 +366,7 @@ 	$< "Bool->Bool->Bool->Bool"   > test/diff/tiers-$*-Bool-Bool-Bool-Bool.out 	# functions of lists 	$< "[()]->[()]"     6 > test/diff/tiers-$*-Us-Us.out-	$< "[Bool]->[Bool]" 6 > test/diff/tiers-$*-Bools-Bools.out+	$< "[Bool]->[Bool]" 5 > test/diff/tiers-$*-Bools-Bools.out 	$< "[Nat]->[Nat]"   6 > test/diff/tiers-$*-Nats-Nats.out 	$< "[Int]->[Int]"   6 > test/diff/tiers-$*-Ints-Ints.out 	# more functions
README.md view
@@ -226,9 +226,12 @@  LeanCheck is subject to a chapter in a [PhD Thesis (2017)]. +LeanCheck has a list of [frequently asked questions] and answers.+ [LeanCheck's Haddock documentation]: https://hackage.haskell.org/package/leancheck/docs/Test-LeanCheck.html [tutorial on property-based testing with LeanCheck]: https://github.com/rudymatela/leancheck/blob/master/doc/tutorial.md [LeanCheck memory usage]: https://github.com/rudymatela/leancheck/blob/master/doc/memory-usage.md+[frequently asked questions]: https://github.com/rudymatela/leancheck/blob/master/doc/faq.md  [`Listable`]:       https://hackage.haskell.org/package/leancheck/docs/Test-LeanCheck.html#t:Listable [`holds`]:          https://hackage.haskell.org/package/leancheck/docs/Test-LeanCheck.html#v:holds
changelog.md view
@@ -1,6 +1,18 @@ Changelog for LeanCheck ======================= +v0.9.4+------++* no code changes in what is exported by `Test.LeanCheck`+* add `errorToLeft` and `anyErrorToLeft` on `Test.LeanCheck.Error`+* add `?==?` and `!==!` on `Test.LeanCheck.Error`+* add `Test.LeanCheck.Function.List`+* add `Test.LeanCheck.Function.Ord`+* reduce default argument enumeration to 12 on `Test.LeanCheck.Function.Eq`+* add FAQ+* improve Makefile and test scripts+ v0.9.3 ------ 
doc/faq.md view
@@ -174,10 +174,65 @@ LeanCheck facilitates the use of [Extrapolate] to generalize counterexamples.  +Are LeanCheck property tests biased towards the first argument?+---------------------------------------------------------------++No and yes.++LeanCheck is only biased towards the first argument on the _very last tier_+being tested.  For all other tiers it is fair.++LeanCheck tries to be fair between tiers, but not within them. The idea is that+values on the same tier have the same "priority" when tested, none is more+important than others. One way to make it so that tests are always fair could+be to use size, instead of the number of tests as a parameter to holds and+check. And that's exactly what [SmallCheck] and [Feat] do -- on them you choose+the number of tests by configuring the maximum depth/size.++On LeanCheck, we choose to use the number of tests for two reasons:++* it just seems simpler from the user's perspective;+* it allows for a more precise control of runtime if you have expensive tests;++The drawback is that LeanCheck may end up being "unfair" to the last tier being+tested, being biased towards the first property and constructor arguments.+However that only happens for the _very last_ tier of values.++One way to still keep it simpler but loosing fine grained control of runtime,+is to define holds as follows:++```+-- | Does a property __hold__ for at least the given number of test values?+--+-- > holds 1000 $ \xs -> length (sort xs) == length xs+--+-- The actual number of tests may be higher than the given number of test+-- values to account for fairness: if we start testing a tier of values, we do+-- so until the end.+holdsForAtLeast :: Testable a => Int -> a -> Bool+holdsForAtLeast n = and+                  . map snd+                  . concatMap snd+                  . takeWhile ((<= n) . fst)+                  . accumulate 0+                  . resultiers+  where+  accumulate n [] = []+  accumulate n (xs:xss) = let n' = n + length xs+                          in  (n',xs) : accumulate n' xss+```++That way, it will be fair to the last tier being tested -- which is where the+unfairness may rise.++(cf. [LeanCheck GitHub issue #14](https://github.com/rudymatela/leancheck/issues/14))++ [LeanCheck]:    https://hackage.haskell.org/package/leancheck [QuickCheck]:   https://hackage.haskell.org/package/QuickCheck [Feat]:         https://hackage.haskell.org/package/testing-feat [Extrapolate]:  https://hackage.haskell.org/package/extrapolate+[SmallCheck]:   https://hackage.haskell.org/package/smallcheck [LeanCheck tutorial]: doc/tutorial.md [`Listable`]:  https://hackage.haskell.org/package/leancheck/docs/Test-LeanCheck.html#t:Listable [`Testable`]:  https://hackage.haskell.org/package/leancheck/docs/Test-LeanCheck.html#t:Testable
leancheck.cabal view
@@ -11,7 +11,7 @@ -- this cabal file too complicated.  -- Rudy  name:                leancheck-version:             0.9.3+version:             0.9.4 synopsis:            Enumerative property-based testing description:   LeanCheck is a simple enumerative property-based testing library.@@ -89,7 +89,7 @@ source-repository this   type:            git   location:        https://github.com/rudymatela/leancheck-  tag:             v0.9.3+  tag:             v0.9.4  library   exposed-modules: Test.LeanCheck@@ -107,9 +107,11 @@                  , Test.LeanCheck.Stats                  , Test.LeanCheck.Function                  , Test.LeanCheck.Function.Eq+                 , Test.LeanCheck.Function.Ord                  , Test.LeanCheck.Function.Show                  , Test.LeanCheck.Function.Show.EightLines                  , Test.LeanCheck.Function.Show.FourCases+                 , Test.LeanCheck.Function.List                  , Test.LeanCheck.Function.Listable                  , Test.LeanCheck.Function.Listable.ListsOfPairs                  , Test.LeanCheck.Function.ListsOfPairs
mk/depend.mk view
@@ -56,6 +56,7 @@   src/Test/LeanCheck/Function/ShowFunction.hs \   src/Test/LeanCheck/Function/Show/FourCases.hs \   src/Test/LeanCheck/Function/ListsOfPairs.hs \+  src/Test/LeanCheck/Function/List.hs \   src/Test/LeanCheck/Function/Listable.hs \   src/Test/LeanCheck/Function/Listable/ListsOfPairs.hs \   src/Test/LeanCheck/Function/Eq.hs \@@ -81,6 +82,7 @@   src/Test/LeanCheck/Function/Show/EightLines.hs \   src/Test/LeanCheck/Function.hs \   src/Test/LeanCheck/Function/ListsOfPairs.hs \+  src/Test/LeanCheck/Function/List.hs \   src/Test/LeanCheck/Function/Listable.hs \   src/Test/LeanCheck/Function/Listable/ListsOfPairs.hs \   src/Test/LeanCheck/Function/Eq.hs \@@ -100,6 +102,7 @@   src/Test/LeanCheck/Function/Show/EightLines.hs \   src/Test/LeanCheck/Function.hs \   src/Test/LeanCheck/Function/ListsOfPairs.hs \+  src/Test/LeanCheck/Function/List.hs \   src/Test/LeanCheck/Function/Listable.hs \   src/Test/LeanCheck/Function/Listable/ListsOfPairs.hs \   src/Test/LeanCheck/Function/Eq.hs \@@ -266,9 +269,18 @@   src/Test/LeanCheck/Derive.hs \   src/Test/LeanCheck/Core.hs \   src/Test/LeanCheck/Basic.hs+src/Test/LeanCheck/Function/Eq: \+  mk/toplibs src/Test/LeanCheck/Function/Eq.o: \+  src/Test/LeanCheck/Tiers.hs \+  src/Test/LeanCheck.hs \+  src/Test/LeanCheck/IO.hs \+  src/Test/LeanCheck/Function/List.hs \   src/Test/LeanCheck/Function/Eq.hs \-  src/Test/LeanCheck/Core.hs+  src/Test/LeanCheck/Error.hs \+  src/Test/LeanCheck/Derive.hs \+  src/Test/LeanCheck/Core.hs \+  src/Test/LeanCheck/Basic.hs src/Test/LeanCheck/Function/Listable/ListsOfPairs.o: \   src/Test/LeanCheck/Tiers.hs \   src/Test/LeanCheck.hs \@@ -288,11 +300,33 @@   src/Test/LeanCheck/Derive.hs \   src/Test/LeanCheck/Core.hs \   src/Test/LeanCheck/Basic.hs+src/Test/LeanCheck/Function/List.o: \+  src/Test/LeanCheck/Tiers.hs \+  src/Test/LeanCheck.hs \+  src/Test/LeanCheck/IO.hs \+  src/Test/LeanCheck/Function/List.hs \+  src/Test/LeanCheck/Error.hs \+  src/Test/LeanCheck/Derive.hs \+  src/Test/LeanCheck/Core.hs \+  src/Test/LeanCheck/Basic.hs src/Test/LeanCheck/Function/ListsOfPairs.o: \   src/Test/LeanCheck/Tiers.hs \   src/Test/LeanCheck.hs \   src/Test/LeanCheck/IO.hs \   src/Test/LeanCheck/Function/ListsOfPairs.hs \+  src/Test/LeanCheck/Derive.hs \+  src/Test/LeanCheck/Core.hs \+  src/Test/LeanCheck/Basic.hs+src/Test/LeanCheck/Function/Ord: \+  mk/toplibs+src/Test/LeanCheck/Function/Ord.o: \+  src/Test/LeanCheck/Tiers.hs \+  src/Test/LeanCheck.hs \+  src/Test/LeanCheck/IO.hs \+  src/Test/LeanCheck/Function/Ord.hs \+  src/Test/LeanCheck/Function/List.hs \+  src/Test/LeanCheck/Function/Eq.hs \+  src/Test/LeanCheck/Error.hs \   src/Test/LeanCheck/Derive.hs \   src/Test/LeanCheck/Core.hs \   src/Test/LeanCheck/Basic.hs
mk/ghcdeps view
@@ -2,7 +2,7 @@ # # ghcdeps: generate Haskell make dependencies for compiling with GHC. #-# Copyright (c) 2015-2020 Rudy Matela.+# Copyright (c) 2015-2021 Rudy Matela. # Distributed under the 3-Clause BSD licence. # # From a list of files provided on standard input,@@ -46,4 +46,5 @@ 	rm -f tmp.mk done | sort |+grep -v "^Loaded package environment from " | sed -e 's,  *, \\\n  ,g'
mk/haddock-i view
@@ -2,7 +2,7 @@ # # haddock-i: list haddock's -i parameters. #-# Copyright (c) 2015-2020 Rudy Matela.+# Copyright (c) 2015-2021 Rudy Matela. # Distributed under the 3-Clause BSD licence. # # $ haddock-i <package1> <package2> ... <packageN>
mk/haskell.mk view
@@ -1,6 +1,6 @@ # Implicit rules for compiling Haskell code. #-# Copyright (c) 2015-2020 Rudy Matela.+# Copyright (c) 2015-2021 Rudy Matela. # Distributed under the 3-Clause BSD licence. # # You can optionally configure the "Configuration variables" below in your main@@ -80,7 +80,8 @@   # Cleaning rule (add as a clean dependency)-.PHONY: clean-hi-o+clean-hs: clean-hi-o clean-haddock clean-cabal clean-stack+ clean-hi-o: 	find $(ALL_HSS) | sed -e 's/hs$$/o/'      | xargs rm -f 	find $(ALL_HSS) | sed -e 's/hs$$/hi/'     | xargs rm -f@@ -113,6 +114,11 @@ 	  $(HADDOCK_HLNK_SRC) \ 	  $(HADDOCKFLAGS) +clean-cabal:+	rm -rf dist/ dist-newstyle/ cabal.project.local cabal.project.local~++clean-stack:+	rm -rf .stack-work/ stack.yaml.lock  # lists all Haskell source files list-all-hss:
mk/install-on view
@@ -2,9 +2,12 @@ # # mk/install-on: install or updates the mk folder on a Haskell project #+# Copyright (c) 2019-2021 Rudy Matela.+# Distributed under the 3-Clause BSD licence.+# # usage: ./mk/install-on path/to/project #-# This assumes a few things:+# This script assumes that: # # * tests are stored in a "test/" folder # * sources are stored in a "src/" folder
src/Test/LeanCheck/Error.hs view
@@ -26,7 +26,11 @@   , errorToNothing   , errorToFalse   , errorToTrue+  , errorToLeft   , anyErrorToNothing+  , anyErrorToLeft+  , (?==?)+  , (!==!)    , module Test.LeanCheck   )@@ -56,10 +60,10 @@ import Control.Monad (liftM) import System.IO.Unsafe (unsafePerformIO) import Data.Maybe (listToMaybe, fromMaybe)+import Data.Function (on) import Control.Exception ( evaluate                          , catch #if __GLASGOW_HASKELL__-                         , Exception                          , SomeException                          , ArithException                          , ArrayException@@ -70,10 +74,9 @@ #endif                          ) --- | Takes a value and a function.  Ignores the value.  Binds the argument of---   the function to the type of the value.-bindArgumentType :: a -> (a -> b) -> a -> b-bindArgumentType _ f  =  f+etom :: Either b a -> Maybe a+etom (Right x)  =  Just x+etom (Left _)   =  Nothing  -- | Transforms a value into 'Just' that value or 'Nothing' on some errors: --@@ -93,30 +96,68 @@ -- -- This function uses 'unsafePerformIO'. errorToNothing :: a -> Maybe a-errorToNothing x  =  unsafePerformIO $+errorToNothing  =  etom . errorToLeft++-- | Transforms a value into 'Just' that value or 'Nothing' on error.+anyErrorToNothing :: a -> Maybe a+anyErrorToNothing  =  etom . anyErrorToLeft++-- | Transforms a value into 'Right' that value or 'Left String' on some errors:+--+--   * ArithException+--   * ArrayException+--   * ErrorCall+--   * PatternMatchFail+--+-- > > errorToLeft False+-- > Just False+--+-- > > errorToLeft (0 :: Int)+-- > Just 0+--+-- > > errorToLeft (undefined :: ())+-- > Left "Prelude.undefined"+--+-- > > errorToLeft (error "error message")+-- > Left "error message"+--+-- > > errorToLeft (1 `div` 0 :: Int)+-- > Left "divide by zero"+--+-- Only the first line of the error's string representation is included.+--+-- This function uses 'unsafePerformIO'.+errorToLeft :: a -> Either String a+errorToLeft x  =  unsafePerformIO $ #if __GLASGOW_HASKELL__-  (Just `liftM` evaluate x) `catches` map ($ return Nothing)-                                      [ hf (undefined :: ArithException)-                                      , hf (undefined :: ArrayException)-                                      , hf (undefined :: ErrorCall)-                                      , hf (undefined :: PatternMatchFail)-                                      ]-  where-  hf :: Exception e => e -> IO a -> Handler a -- handlerFor-  hf e h  =  Handler $ bindArgumentType e (\_ -> h)+  (Right `liftM` evaluate x) `catches`+    [ Handler $ \e -> return . Left $ show1st (e :: ArithException)+    , Handler $ \e -> return . Left $ show1st (e :: ArrayException)+    , Handler $ \e -> return . Left $ show1st (e :: ErrorCall)+    , Handler $ \e -> return . Left $ show1st (e :: PatternMatchFail)+    ] #else-  (Just `liftM` evaluate x) `catch` (\_ -> return Nothing)+  (Right `liftM` evaluate x) `catch` (return . Left . show1st) #endif+  where+  show1st :: Show a => a -> String+  show1st  =  concat . take 1 . lines . show --- | Transforms a value into 'Just' that value or 'Nothing' on error.-anyErrorToNothing :: a -> Maybe a-anyErrorToNothing x  =  unsafePerformIO $+-- | Transforms a value into 'Right' that value or 'Left String' on error.+--+-- Only the first line of the error's string representation is included.+--+-- This function uses 'unsafePerformIO'.  See: 'errorToLeft'.+anyErrorToLeft :: a -> Either String a+anyErrorToLeft x  =  unsafePerformIO $ #if __GLASGOW_HASKELL__-  (Just `liftM` evaluate x) `catch` \e -> do let _  =  e :: SomeException-                                             return Nothing+  (Right `liftM` evaluate x) `catch` (\e -> return . Left $ show1st (e :: SomeException)) #else-  (Just `liftM` evaluate x) `catch` (\_ -> return Nothing)+  (Right `liftM` evaluate x) `catch` (return . Left . show1st) #endif+  where+  show1st :: Show a => a -> String+  show1st  =  concat . take 1 . lines . show  -- | Transforms errors into 'False' values. --@@ -157,6 +198,63 @@ -- > 0 fromError :: a -> a -> a fromError x  =  fromMaybe x . errorToNothing++-- | Equality '==' lifted over 'errorToNothing'+--+-- > > 1 `div` 1  ?==?  2 `div` 2+-- > True+--+-- > > 1 `div` 1  ?==?  1 `div` 2+-- > False+--+-- > > 1 `div` 1  ?==?  1 `div` 0+-- > False+--+-- > > 6 `mod` 0  ?==?  2 `div` 0+-- > True+--+-- > > head []  ?==?  tail []+-- > True+--+-- > > error "a"  ?==?  error "a"+-- > True+--+-- > > error "a"  ?==?  error "b"+-- > True+--+-- This function consider error values equal.+(?==?) :: Eq a => a -> a -> Bool+(?==?)  =  (==) `on` errorToNothing+infix 4 ?==?++-- | Equality '==' lifted over 'errorToLeft'+--+-- > > 1 `div` 1  !==!  2 `div` 2+-- > True+--+-- > > 1 `div` 1  !==!  1 `div` 2+-- > False+--+-- > > 1 `div` 1  !==!  1 `div` 0+-- > False+--+-- > > 6 `mod` 0  !==!  2 `div` 0+-- > True+--+-- > > head []  !==!  tail []+-- > False+--+-- > > error "a"  !==!  error "a"+-- > True+--+-- > > error "a"  !==!  error "b"+-- > False+--+-- On error, this function returns the result+-- of comparing the first line of error values.+(!==!) :: Eq a => a -> a -> Bool+(!==!)  =  (==) `on` errorToLeft+infix 4 !==!  -- | An error-catching version of 'Test.LeanCheck.holds' --   that returns 'False' in case of errors.
src/Test/LeanCheck/Function/Eq.hs view
@@ -1,19 +1,55 @@ -- | -- Module      : Test.LeanCheck.Function.Eq--- Copyright   : (c) 2015-2020 Rudy Matela+-- Copyright   : (c) 2015-2021 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> ----- This module is part of LeanCheck,+-- This /optional/ module is part of LeanCheck, -- a simple enumerative property-based testing library. ----- A toy Eq instance for Functions.+-- A toy 'Eq' instance for functions. ----- Warning: this is only intended to be used in testing modules.  Avoid--- importing this on modules that are used as libraries.+-- > instance (Listable a, Eq b) => Eq (a -> b) where+-- >   (==)  =  areEqualFor 12+--+--+--+--+-- This compares functions by testing them+-- for up to 12 different values of each argument.+--+-- Single argument functions are tested 12 times.+-- Two argument functions are tested 144 times.+-- Three argument functions are tested 1728 times.+-- At each subsequent argument,+-- number of tests and runtime increases 12-fold.+--+-- To customize the number of tests,+-- don't import this and use the above code changing the @12@ value.+-- Keep in mind that this value is number of tests for /each/ argument.+--+-- __Warning:__+-- this is only intended to be used in testing modules.+-- Avoid importing this on modules that are used as libraries+-- as there is no way to unimport a typeclass instance. module Test.LeanCheck.Function.Eq () where  import Test.LeanCheck.Core+import Test.LeanCheck.Function.List ++-- | Two functions are considered equal if their results are equal+--   for twelve different enumerated values of each argument.+--+-- Single argument functions are tested 12 times.+-- Two argument functions are tested 144 times.+-- Three argument functions are tested 1728 times.+-- At each subsequent argument,+-- number of tests and runtime increases 12-fold.+--+-- This is only intended to be available on test programs and modules+-- but not on libraries.  If you see this exported on a library+-- that is not specifically intended to consider equality between+-- functions, file a bug report to the library maintainer. instance (Listable a, Eq b) => Eq (a -> b) where-  f == g  =  and [f x == g x | x <- take 60 list]+  (==)  =  areEqualFor 12
+ src/Test/LeanCheck/Function/List.hs view
@@ -0,0 +1,92 @@+-- |+-- Module      : Test.LeanCheck.Function.List+-- Copyright   : (c) 2015-2021 Rudy Matela+-- License     : 3-Clause BSD  (see the file LICENSE)+-- Maintainer  : Rudy Matela <rudy@matela.com.br>+--+-- This module is part of LeanCheck,+-- a simple enumerative property-based testing library.+--+-- This module exports functions to convert functions to lists of return+-- values and producing comparisons between functions.+module Test.LeanCheck.Function.List+  ( funToList+  , funToListMaybe+  , funToListEither+  , areEqualFor+  , compareFor+  )+where+++import Test.LeanCheck+import Test.LeanCheck.Error (errorToNothing, errorToLeft)+import Data.Function (on)+++-- | Converts a function to a list of result values+--   for each 'Listable' argument value.+--+-- > > list  ::  [Bool]+-- > [False,True]+-- > > funToList not+-- > [True,False]+--+-- > > list  ::  [(Bool,Bool)]+-- > [(False,False),(False,True),(True,False),(True,True)]+-- > > funToList $ uncurry (&&)+-- > [False,False,False,True]+--+-- This function may return an infinite list,+-- use 'take' as required.+--+-- > > take 10 $ list  ::  [Int]+-- > [0,1,-1,2,-2,3,-3,4,-4,5]+-- > > take 10 $ funToList (+1)  ::  [Int]+-- > [1,2,0,3,-1,4,-2,5,-3,6]+funToList :: Listable a => (a -> b) -> [b]+funToList f  =  map f list+++-- | Converts a function to a list of 'Just' result values+--   or 'Nothing' on error.+--+-- > > take 6 $ funToListMaybe $ head :: [Maybe Int]+-- > [Nothing,Just 0,Just 0,Just 1,Just 0,Just 0]+--+-- This uses 'errorToNothing' and consequently 'unsafePerformIO'.+funToListMaybe :: Listable a => (a -> b) -> [Maybe b]+funToListMaybe f  =  map (errorToNothing . f) list+++-- | Converts a function to a list of 'Just' result values+--   or 'Nothing' on error.+--+-- > > take 6 $ funToListEither $ head :: [Either String Int]+-- > [Left "Prelude.head: empty list",Right 0,Right 0,Right 1,Right 0,Right 0]+--+-- This uses 'errorToLeft' and consequently 'unsafePerformIO'.+funToListEither :: Listable a => (a -> b) -> [Either String b]+funToListEither f  =  map (errorToLeft . f) list+++-- | This function can be used to define an Eq instance for functions based on+--   testing and equality of returned values, like so:+--+-- > instance (Listable a, Eq b) => Eq (a -> b) where+-- >   (==)  =  areEqualFor 12+--+-- This catches errors and undefined values and treats them as equal.+areEqualFor :: (Listable a, Eq b) => Int -> (a -> b) -> (a -> b) -> Bool+areEqualFor n  =  (==) `on` (take n . funToListMaybe)+++-- | This function can be used to define an Ord instance for functions based on+--   testing and ordering of returned values, like so:+--+-- > instance (Listable a, Ord b) => Ord (a -> b) where+-- >   compare  =  compareFor 12+--+-- This catches errors and undefined values and treats them as equal.+compareFor :: (Listable a, Ord b) => Int -> (a -> b) -> (a -> b) -> Ordering+compareFor n  =  compare `on` (take n . funToListMaybe)
+ src/Test/LeanCheck/Function/Ord.hs view
@@ -0,0 +1,55 @@+-- |+-- Module      : Test.LeanCheck.Function.Ord+-- Copyright   : (c) 2015-2021 Rudy Matela+-- License     : 3-Clause BSD  (see the file LICENSE)+-- Maintainer  : Rudy Matela <rudy@matela.com.br>+--+-- This /optional/ module is part of LeanCheck,+-- a simple enumerative property-based testing library.+--+-- Toy 'Eq' and 'Ord' instance for functions.+--+-- > instance (Listable a, Eq b) => Eq (a -> b) where+-- >   (==)  =  areEqualFor 12+--+-- > instance (Listable a, Ord b) => Ord (a -> b) where+-- >   compare  =  compareFor 12+--+-- This compares functions by testing them+-- for up to 12 different values of each argument.+--+-- Single argument functions are tested 12 times.+-- Two argument functions are tested 144 times.+-- Three argument functions are tested 1728 times.+-- At each subsequent argument,+-- number of tests and runtime increases 12-fold.+--+-- To customize the number of tests,+-- don't import this and use the above code changing the @12@ value.+-- Keep in mind that this value is number of tests for /each/ argument.+--+-- __Warning:__+-- this is only intended to be used in testing modules.+-- Avoid importing this on modules that are used as libraries+-- as there is no way to unimport a typeclass instance.+module Test.LeanCheck.Function.Ord () where++import Test.LeanCheck.Core+import Test.LeanCheck.Function.List+import Test.LeanCheck.Function.Eq++-- | Two functions are compared based on the results+--   of twelve different enumerated values for each argument.+--+-- Single argument functions are tested 12 times.+-- Two argument functions are tested 144 times.+-- Three argument functions are tested 1728 times.+-- At each subsequent argument,+-- number of tests and runtime increases 12-fold.+--+-- This is only intended to be available on test programs and modules+-- but not on libraries.  If you see this exported on a library+-- that is not specifically intended to consider equality between+-- functions, file a bug report to the library maintainer.+instance (Listable a, Ord b) => Ord (a -> b) where+  compare  =  compareFor 12
test/diff/tiers-4cases-Bools-Bools.out view
@@ -1,4 +1,4 @@-map length (tiers :: [[ [Bool]->[Bool] ]])  =  [1,2,8,26,88,278,...]+map length (tiers :: [[ [Bool]->[Bool] ]])  =  [1,2,8,26,88,...]  length (list :: [ [Bool]->[Bool] ])  =  Infinity @@ -135,285 +135,6 @@     , \_ -> [True,True,False,True]     , \_ -> [True,True,True,False]     , \_ -> [True,True,True,True]-    ]-  , [ \x -> case x of [] -> [False,False,False,False]; _ -> []-    , \x -> case x of [] -> [False,False,False,True]; _ -> []-    , \x -> case x of [] -> [False,False,True,False]; _ -> []-    , \x -> case x of [] -> [False,False,True,True]; _ -> []-    , \x -> case x of [] -> [False,True,False,False]; _ -> []-    , \x -> case x of [] -> [False,True,False,True]; _ -> []-    , \x -> case x of [] -> [False,True,True,False]; _ -> []-    , \x -> case x of [] -> [False,True,True,True]; _ -> []-    , \x -> case x of [] -> [True,False,False,False]; _ -> []-    , \x -> case x of [] -> [True,False,False,True]; _ -> []-    , \x -> case x of [] -> [True,False,True,False]; _ -> []-    , \x -> case x of [] -> [True,False,True,True]; _ -> []-    , \x -> case x of [] -> [True,True,False,False]; _ -> []-    , \x -> case x of [] -> [True,True,False,True]; _ -> []-    , \x -> case x of [] -> [True,True,True,False]; _ -> []-    , \x -> case x of [] -> [True,True,True,True]; _ -> []-    , \x -> case x of [False] -> [False,False,False]; _ -> []-    , \x -> case x of [False] -> [False,False,True]; _ -> []-    , \x -> case x of [False] -> [False,True,False]; _ -> []-    , \x -> case x of [False] -> [False,True,True]; _ -> []-    , \x -> case x of [False] -> [True,False,False]; _ -> []-    , \x -> case x of [False] -> [True,False,True]; _ -> []-    , \x -> case x of [False] -> [True,True,False]; _ -> []-    , \x -> case x of [False] -> [True,True,True]; _ -> []-    , \x -> case x of [True] -> [False,False,False]; _ -> []-    , \x -> case x of [True] -> [False,False,True]; _ -> []-    , \x -> case x of [True] -> [False,True,False]; _ -> []-    , \x -> case x of [True] -> [False,True,True]; _ -> []-    , \x -> case x of [True] -> [True,False,False]; _ -> []-    , \x -> case x of [True] -> [True,False,True]; _ -> []-    , \x -> case x of [True] -> [True,True,False]; _ -> []-    , \x -> case x of [True] -> [True,True,True]; _ -> []-    , \x -> case x of [] -> [False]; [False] -> [False]; _ -> []-    , \x -> case x of [] -> [False]; [False] -> [True]; _ -> []-    , \x -> case x of [] -> [True]; [False] -> [False]; _ -> []-    , \x -> case x of [] -> [True]; [False] -> [True]; _ -> []-    , \x -> case x of [] -> [False]; [True] -> [False]; _ -> []-    , \x -> case x of [] -> [False]; [True] -> [True]; _ -> []-    , \x -> case x of [] -> [True]; [True] -> [False]; _ -> []-    , \x -> case x of [] -> [True]; [True] -> [True]; _ -> []-    , \x -> case x of [False,False] -> [False,False]; _ -> []-    , \x -> case x of [False,False] -> [False,True]; _ -> []-    , \x -> case x of [False,False] -> [True,False]; _ -> []-    , \x -> case x of [False,False] -> [True,True]; _ -> []-    , \x -> case x of [False,True] -> [False,False]; _ -> []-    , \x -> case x of [False,True] -> [False,True]; _ -> []-    , \x -> case x of [False,True] -> [True,False]; _ -> []-    , \x -> case x of [False,True] -> [True,True]; _ -> []-    , \x -> case x of [True,False] -> [False,False]; _ -> []-    , \x -> case x of [True,False] -> [False,True]; _ -> []-    , \x -> case x of [True,False] -> [True,False]; _ -> []-    , \x -> case x of [True,False] -> [True,True]; _ -> []-    , \x -> case x of [True,True] -> [False,False]; _ -> []-    , \x -> case x of [True,True] -> [False,True]; _ -> []-    , \x -> case x of [True,True] -> [True,False]; _ -> []-    , \x -> case x of [True,True] -> [True,True]; _ -> []-    , \x -> case x of [False,False,False] -> [False]; _ -> []-    , \x -> case x of [False,False,False] -> [True]; _ -> []-    , \x -> case x of [False,False,True] -> [False]; _ -> []-    , \x -> case x of [False,False,True] -> [True]; _ -> []-    , \x -> case x of [False,True,False] -> [False]; _ -> []-    , \x -> case x of [False,True,False] -> [True]; _ -> []-    , \x -> case x of [False,True,True] -> [False]; _ -> []-    , \x -> case x of [False,True,True] -> [True]; _ -> []-    , \x -> case x of [True,False,False] -> [False]; _ -> []-    , \x -> case x of [True,False,False] -> [True]; _ -> []-    , \x -> case x of [True,False,True] -> [False]; _ -> []-    , \x -> case x of [True,False,True] -> [True]; _ -> []-    , \x -> case x of [True,True,False] -> [False]; _ -> []-    , \x -> case x of [True,True,False] -> [True]; _ -> []-    , \x -> case x of [True,True,True] -> [False]; _ -> []-    , \x -> case x of [True,True,True] -> [True]; _ -> []-    , \x -> case x of [] -> [False,False,False]; _ -> [False]-    , \x -> case x of [] -> [False,False,True]; _ -> [False]-    , \x -> case x of [] -> [False,True,False]; _ -> [False]-    , \x -> case x of [] -> [False,True,True]; _ -> [False]-    , \x -> case x of [] -> [True,False,False]; _ -> [False]-    , \x -> case x of [] -> [True,False,True]; _ -> [False]-    , \x -> case x of [] -> [True,True,False]; _ -> [False]-    , \x -> case x of [] -> [True,True,True]; _ -> [False]-    , \x -> case x of [False] -> [False,False]; _ -> [False]-    , \x -> case x of [False] -> [False,True]; _ -> [False]-    , \x -> case x of [False] -> [True,False]; _ -> [False]-    , \x -> case x of [False] -> [True,True]; _ -> [False]-    , \x -> case x of [True] -> [False,False]; _ -> [False]-    , \x -> case x of [True] -> [False,True]; _ -> [False]-    , \x -> case x of [True] -> [True,False]; _ -> [False]-    , \x -> case x of [True] -> [True,True]; _ -> [False]-    , \x -> case x of [] -> []; [False] -> [True]; _ -> [False]-    , \x -> case x of [] -> [True]; [False] -> []; _ -> [False]-    , \x -> case x of [] -> []; [True] -> [True]; _ -> [False]-    , \x -> case x of [] -> [True]; [True] -> []; _ -> [False]-    , \x -> case x of [False,False] -> [True]; _ -> [False]-    , \x -> case x of [False,True] -> [True]; _ -> [False]-    , \x -> case x of [True,False] -> [True]; _ -> [False]-    , \x -> case x of [True,True] -> [True]; _ -> [False]-    , \x -> case x of [] -> []; [False,False] -> []; _ -> [False]-    , \x -> case x of [] -> []; [False,True] -> []; _ -> [False]-    , \x -> case x of [] -> []; [True,False] -> []; _ -> [False]-    , \x -> case x of [] -> []; [True,True] -> []; _ -> [False]-    , \x -> case x of [False] -> []; [True] -> []; _ -> [False]-    , \x -> case x of [False,False,False] -> []; _ -> [False]-    , \x -> case x of [False,False,True] -> []; _ -> [False]-    , \x -> case x of [False,True,False] -> []; _ -> [False]-    , \x -> case x of [False,True,True] -> []; _ -> [False]-    , \x -> case x of [True,False,False] -> []; _ -> [False]-    , \x -> case x of [True,False,True] -> []; _ -> [False]-    , \x -> case x of [True,True,False] -> []; _ -> [False]-    , \x -> case x of [True,True,True] -> []; _ -> [False]-    , \x -> case x of [] -> [False,False,False]; _ -> [True]-    , \x -> case x of [] -> [False,False,True]; _ -> [True]-    , \x -> case x of [] -> [False,True,False]; _ -> [True]-    , \x -> case x of [] -> [False,True,True]; _ -> [True]-    , \x -> case x of [] -> [True,False,False]; _ -> [True]-    , \x -> case x of [] -> [True,False,True]; _ -> [True]-    , \x -> case x of [] -> [True,True,False]; _ -> [True]-    , \x -> case x of [] -> [True,True,True]; _ -> [True]-    , \x -> case x of [False] -> [False,False]; _ -> [True]-    , \x -> case x of [False] -> [False,True]; _ -> [True]-    , \x -> case x of [False] -> [True,False]; _ -> [True]-    , \x -> case x of [False] -> [True,True]; _ -> [True]-    , \x -> case x of [True] -> [False,False]; _ -> [True]-    , \x -> case x of [True] -> [False,True]; _ -> [True]-    , \x -> case x of [True] -> [True,False]; _ -> [True]-    , \x -> case x of [True] -> [True,True]; _ -> [True]-    , \x -> case x of [] -> []; [False] -> [False]; _ -> [True]-    , \x -> case x of [] -> [False]; [False] -> []; _ -> [True]-    , \x -> case x of [] -> []; [True] -> [False]; _ -> [True]-    , \x -> case x of [] -> [False]; [True] -> []; _ -> [True]-    , \x -> case x of [False,False] -> [False]; _ -> [True]-    , \x -> case x of [False,True] -> [False]; _ -> [True]-    , \x -> case x of [True,False] -> [False]; _ -> [True]-    , \x -> case x of [True,True] -> [False]; _ -> [True]-    , \x -> case x of [] -> []; [False,False] -> []; _ -> [True]-    , \x -> case x of [] -> []; [False,True] -> []; _ -> [True]-    , \x -> case x of [] -> []; [True,False] -> []; _ -> [True]-    , \x -> case x of [] -> []; [True,True] -> []; _ -> [True]-    , \x -> case x of [False] -> []; [True] -> []; _ -> [True]-    , \x -> case x of [False,False,False] -> []; _ -> [True]-    , \x -> case x of [False,False,True] -> []; _ -> [True]-    , \x -> case x of [False,True,False] -> []; _ -> [True]-    , \x -> case x of [False,True,True] -> []; _ -> [True]-    , \x -> case x of [True,False,False] -> []; _ -> [True]-    , \x -> case x of [True,False,True] -> []; _ -> [True]-    , \x -> case x of [True,True,False] -> []; _ -> [True]-    , \x -> case x of [True,True,True] -> []; _ -> [True]-    , \x -> case x of [] -> [False,True]; _ -> [False,False]-    , \x -> case x of [] -> [True,False]; _ -> [False,False]-    , \x -> case x of [] -> [True,True]; _ -> [False,False]-    , \x -> case x of [False] -> [False]; _ -> [False,False]-    , \x -> case x of [False] -> [True]; _ -> [False,False]-    , \x -> case x of [True] -> [False]; _ -> [False,False]-    , \x -> case x of [True] -> [True]; _ -> [False,False]-    , \x -> case x of [] -> []; [False] -> []; _ -> [False,False]-    , \x -> case x of [] -> []; [True] -> []; _ -> [False,False]-    , \x -> case x of [False,False] -> []; _ -> [False,False]-    , \x -> case x of [False,True] -> []; _ -> [False,False]-    , \x -> case x of [True,False] -> []; _ -> [False,False]-    , \x -> case x of [True,True] -> []; _ -> [False,False]-    , \x -> case x of [] -> [False,False]; _ -> [False,True]-    , \x -> case x of [] -> [True,False]; _ -> [False,True]-    , \x -> case x of [] -> [True,True]; _ -> [False,True]-    , \x -> case x of [False] -> [False]; _ -> [False,True]-    , \x -> case x of [False] -> [True]; _ -> [False,True]-    , \x -> case x of [True] -> [False]; _ -> [False,True]-    , \x -> case x of [True] -> [True]; _ -> [False,True]-    , \x -> case x of [] -> []; [False] -> []; _ -> [False,True]-    , \x -> case x of [] -> []; [True] -> []; _ -> [False,True]-    , \x -> case x of [False,False] -> []; _ -> [False,True]-    , \x -> case x of [False,True] -> []; _ -> [False,True]-    , \x -> case x of [True,False] -> []; _ -> [False,True]-    , \x -> case x of [True,True] -> []; _ -> [False,True]-    , \x -> case x of [] -> [False,False]; _ -> [True,False]-    , \x -> case x of [] -> [False,True]; _ -> [True,False]-    , \x -> case x of [] -> [True,True]; _ -> [True,False]-    , \x -> case x of [False] -> [False]; _ -> [True,False]-    , \x -> case x of [False] -> [True]; _ -> [True,False]-    , \x -> case x of [True] -> [False]; _ -> [True,False]-    , \x -> case x of [True] -> [True]; _ -> [True,False]-    , \x -> case x of [] -> []; [False] -> []; _ -> [True,False]-    , \x -> case x of [] -> []; [True] -> []; _ -> [True,False]-    , \x -> case x of [False,False] -> []; _ -> [True,False]-    , \x -> case x of [False,True] -> []; _ -> [True,False]-    , \x -> case x of [True,False] -> []; _ -> [True,False]-    , \x -> case x of [True,True] -> []; _ -> [True,False]-    , \x -> case x of [] -> [False,False]; _ -> [True,True]-    , \x -> case x of [] -> [False,True]; _ -> [True,True]-    , \x -> case x of [] -> [True,False]; _ -> [True,True]-    , \x -> case x of [False] -> [False]; _ -> [True,True]-    , \x -> case x of [False] -> [True]; _ -> [True,True]-    , \x -> case x of [True] -> [False]; _ -> [True,True]-    , \x -> case x of [True] -> [True]; _ -> [True,True]-    , \x -> case x of [] -> []; [False] -> []; _ -> [True,True]-    , \x -> case x of [] -> []; [True] -> []; _ -> [True,True]-    , \x -> case x of [False,False] -> []; _ -> [True,True]-    , \x -> case x of [False,True] -> []; _ -> [True,True]-    , \x -> case x of [True,False] -> []; _ -> [True,True]-    , \x -> case x of [True,True] -> []; _ -> [True,True]-    , \x -> case x of [] -> [False]; _ -> [False,False,False]-    , \x -> case x of [] -> [True]; _ -> [False,False,False]-    , \x -> case x of [False] -> []; _ -> [False,False,False]-    , \x -> case x of [True] -> []; _ -> [False,False,False]-    , \x -> case x of [] -> [False]; _ -> [False,False,True]-    , \x -> case x of [] -> [True]; _ -> [False,False,True]-    , \x -> case x of [False] -> []; _ -> [False,False,True]-    , \x -> case x of [True] -> []; _ -> [False,False,True]-    , \x -> case x of [] -> [False]; _ -> [False,True,False]-    , \x -> case x of [] -> [True]; _ -> [False,True,False]-    , \x -> case x of [False] -> []; _ -> [False,True,False]-    , \x -> case x of [True] -> []; _ -> [False,True,False]-    , \x -> case x of [] -> [False]; _ -> [False,True,True]-    , \x -> case x of [] -> [True]; _ -> [False,True,True]-    , \x -> case x of [False] -> []; _ -> [False,True,True]-    , \x -> case x of [True] -> []; _ -> [False,True,True]-    , \x -> case x of [] -> [False]; _ -> [True,False,False]-    , \x -> case x of [] -> [True]; _ -> [True,False,False]-    , \x -> case x of [False] -> []; _ -> [True,False,False]-    , \x -> case x of [True] -> []; _ -> [True,False,False]-    , \x -> case x of [] -> [False]; _ -> [True,False,True]-    , \x -> case x of [] -> [True]; _ -> [True,False,True]-    , \x -> case x of [False] -> []; _ -> [True,False,True]-    , \x -> case x of [True] -> []; _ -> [True,False,True]-    , \x -> case x of [] -> [False]; _ -> [True,True,False]-    , \x -> case x of [] -> [True]; _ -> [True,True,False]-    , \x -> case x of [False] -> []; _ -> [True,True,False]-    , \x -> case x of [True] -> []; _ -> [True,True,False]-    , \x -> case x of [] -> [False]; _ -> [True,True,True]-    , \x -> case x of [] -> [True]; _ -> [True,True,True]-    , \x -> case x of [False] -> []; _ -> [True,True,True]-    , \x -> case x of [True] -> []; _ -> [True,True,True]-    , \x -> case x of [] -> []; _ -> [False,False,False,False]-    , \x -> case x of [] -> []; _ -> [False,False,False,True]-    , \x -> case x of [] -> []; _ -> [False,False,True,False]-    , \x -> case x of [] -> []; _ -> [False,False,True,True]-    , \x -> case x of [] -> []; _ -> [False,True,False,False]-    , \x -> case x of [] -> []; _ -> [False,True,False,True]-    , \x -> case x of [] -> []; _ -> [False,True,True,False]-    , \x -> case x of [] -> []; _ -> [False,True,True,True]-    , \x -> case x of [] -> []; _ -> [True,False,False,False]-    , \x -> case x of [] -> []; _ -> [True,False,False,True]-    , \x -> case x of [] -> []; _ -> [True,False,True,False]-    , \x -> case x of [] -> []; _ -> [True,False,True,True]-    , \x -> case x of [] -> []; _ -> [True,True,False,False]-    , \x -> case x of [] -> []; _ -> [True,True,False,True]-    , \x -> case x of [] -> []; _ -> [True,True,True,False]-    , \x -> case x of [] -> []; _ -> [True,True,True,True]-    , \_ -> [False,False,False,False,False]-    , \_ -> [False,False,False,False,True]-    , \_ -> [False,False,False,True,False]-    , \_ -> [False,False,False,True,True]-    , \_ -> [False,False,True,False,False]-    , \_ -> [False,False,True,False,True]-    , \_ -> [False,False,True,True,False]-    , \_ -> [False,False,True,True,True]-    , \_ -> [False,True,False,False,False]-    , \_ -> [False,True,False,False,True]-    , \_ -> [False,True,False,True,False]-    , \_ -> [False,True,False,True,True]-    , \_ -> [False,True,True,False,False]-    , \_ -> [False,True,True,False,True]-    , \_ -> [False,True,True,True,False]-    , \_ -> [False,True,True,True,True]-    , \_ -> [True,False,False,False,False]-    , \_ -> [True,False,False,False,True]-    , \_ -> [True,False,False,True,False]-    , \_ -> [True,False,False,True,True]-    , \_ -> [True,False,True,False,False]-    , \_ -> [True,False,True,False,True]-    , \_ -> [True,False,True,True,False]-    , \_ -> [True,False,True,True,True]-    , \_ -> [True,True,False,False,False]-    , \_ -> [True,True,False,False,True]-    , \_ -> [True,True,False,True,False]-    , \_ -> [True,True,False,True,True]-    , \_ -> [True,True,True,False,False]-    , \_ -> [True,True,True,False,True]-    , \_ -> [True,True,True,True,False]-    , \_ -> [True,True,True,True,True]     ]   , ...   ]
test/diff/tiers-default-Bools-Bools.out view
@@ -1,4 +1,4 @@-map length (tiers :: [[ [Bool]->[Bool] ]])  =  [1,2,8,26,88,278,...]+map length (tiers :: [[ [Bool]->[Bool] ]])  =  [1,2,8,26,88,...]  length (list :: [ [Bool]->[Bool] ])  =  Infinity @@ -327,811 +327,6 @@     , \_ -> [True,True,False,True]     , \_ -> [True,True,True,False]     , \_ -> [True,True,True,True]-    ]-  , [ \x -> case x of-            [] -> [False,False,False,False]-            _ -> []-    , \x -> case x of-            [] -> [False,False,False,True]-            _ -> []-    , \x -> case x of-            [] -> [False,False,True,False]-            _ -> []-    , \x -> case x of-            [] -> [False,False,True,True]-            _ -> []-    , \x -> case x of-            [] -> [False,True,False,False]-            _ -> []-    , \x -> case x of-            [] -> [False,True,False,True]-            _ -> []-    , \x -> case x of-            [] -> [False,True,True,False]-            _ -> []-    , \x -> case x of-            [] -> [False,True,True,True]-            _ -> []-    , \x -> case x of-            [] -> [True,False,False,False]-            _ -> []-    , \x -> case x of-            [] -> [True,False,False,True]-            _ -> []-    , \x -> case x of-            [] -> [True,False,True,False]-            _ -> []-    , \x -> case x of-            [] -> [True,False,True,True]-            _ -> []-    , \x -> case x of-            [] -> [True,True,False,False]-            _ -> []-    , \x -> case x of-            [] -> [True,True,False,True]-            _ -> []-    , \x -> case x of-            [] -> [True,True,True,False]-            _ -> []-    , \x -> case x of-            [] -> [True,True,True,True]-            _ -> []-    , \x -> case x of-            [False] -> [False,False,False]-            _ -> []-    , \x -> case x of-            [False] -> [False,False,True]-            _ -> []-    , \x -> case x of-            [False] -> [False,True,False]-            _ -> []-    , \x -> case x of-            [False] -> [False,True,True]-            _ -> []-    , \x -> case x of-            [False] -> [True,False,False]-            _ -> []-    , \x -> case x of-            [False] -> [True,False,True]-            _ -> []-    , \x -> case x of-            [False] -> [True,True,False]-            _ -> []-    , \x -> case x of-            [False] -> [True,True,True]-            _ -> []-    , \x -> case x of-            [True] -> [False,False,False]-            _ -> []-    , \x -> case x of-            [True] -> [False,False,True]-            _ -> []-    , \x -> case x of-            [True] -> [False,True,False]-            _ -> []-    , \x -> case x of-            [True] -> [False,True,True]-            _ -> []-    , \x -> case x of-            [True] -> [True,False,False]-            _ -> []-    , \x -> case x of-            [True] -> [True,False,True]-            _ -> []-    , \x -> case x of-            [True] -> [True,True,False]-            _ -> []-    , \x -> case x of-            [True] -> [True,True,True]-            _ -> []-    , \x -> case x of-            [] -> [False]-            [False] -> [False]-            _ -> []-    , \x -> case x of-            [] -> [False]-            [False] -> [True]-            _ -> []-    , \x -> case x of-            [] -> [True]-            [False] -> [False]-            _ -> []-    , \x -> case x of-            [] -> [True]-            [False] -> [True]-            _ -> []-    , \x -> case x of-            [] -> [False]-            [True] -> [False]-            _ -> []-    , \x -> case x of-            [] -> [False]-            [True] -> [True]-            _ -> []-    , \x -> case x of-            [] -> [True]-            [True] -> [False]-            _ -> []-    , \x -> case x of-            [] -> [True]-            [True] -> [True]-            _ -> []-    , \x -> case x of-            [False,False] -> [False,False]-            _ -> []-    , \x -> case x of-            [False,False] -> [False,True]-            _ -> []-    , \x -> case x of-            [False,False] -> [True,False]-            _ -> []-    , \x -> case x of-            [False,False] -> [True,True]-            _ -> []-    , \x -> case x of-            [False,True] -> [False,False]-            _ -> []-    , \x -> case x of-            [False,True] -> [False,True]-            _ -> []-    , \x -> case x of-            [False,True] -> [True,False]-            _ -> []-    , \x -> case x of-            [False,True] -> [True,True]-            _ -> []-    , \x -> case x of-            [True,False] -> [False,False]-            _ -> []-    , \x -> case x of-            [True,False] -> [False,True]-            _ -> []-    , \x -> case x of-            [True,False] -> [True,False]-            _ -> []-    , \x -> case x of-            [True,False] -> [True,True]-            _ -> []-    , \x -> case x of-            [True,True] -> [False,False]-            _ -> []-    , \x -> case x of-            [True,True] -> [False,True]-            _ -> []-    , \x -> case x of-            [True,True] -> [True,False]-            _ -> []-    , \x -> case x of-            [True,True] -> [True,True]-            _ -> []-    , \x -> case x of-            [False,False,False] -> [False]-            _ -> []-    , \x -> case x of-            [False,False,False] -> [True]-            _ -> []-    , \x -> case x of-            [False,False,True] -> [False]-            _ -> []-    , \x -> case x of-            [False,False,True] -> [True]-            _ -> []-    , \x -> case x of-            [False,True,False] -> [False]-            _ -> []-    , \x -> case x of-            [False,True,False] -> [True]-            _ -> []-    , \x -> case x of-            [False,True,True] -> [False]-            _ -> []-    , \x -> case x of-            [False,True,True] -> [True]-            _ -> []-    , \x -> case x of-            [True,False,False] -> [False]-            _ -> []-    , \x -> case x of-            [True,False,False] -> [True]-            _ -> []-    , \x -> case x of-            [True,False,True] -> [False]-            _ -> []-    , \x -> case x of-            [True,False,True] -> [True]-            _ -> []-    , \x -> case x of-            [True,True,False] -> [False]-            _ -> []-    , \x -> case x of-            [True,True,False] -> [True]-            _ -> []-    , \x -> case x of-            [True,True,True] -> [False]-            _ -> []-    , \x -> case x of-            [True,True,True] -> [True]-            _ -> []-    , \x -> case x of-            [] -> [False,False,False]-            _ -> [False]-    , \x -> case x of-            [] -> [False,False,True]-            _ -> [False]-    , \x -> case x of-            [] -> [False,True,False]-            _ -> [False]-    , \x -> case x of-            [] -> [False,True,True]-            _ -> [False]-    , \x -> case x of-            [] -> [True,False,False]-            _ -> [False]-    , \x -> case x of-            [] -> [True,False,True]-            _ -> [False]-    , \x -> case x of-            [] -> [True,True,False]-            _ -> [False]-    , \x -> case x of-            [] -> [True,True,True]-            _ -> [False]-    , \x -> case x of-            [False] -> [False,False]-            _ -> [False]-    , \x -> case x of-            [False] -> [False,True]-            _ -> [False]-    , \x -> case x of-            [False] -> [True,False]-            _ -> [False]-    , \x -> case x of-            [False] -> [True,True]-            _ -> [False]-    , \x -> case x of-            [True] -> [False,False]-            _ -> [False]-    , \x -> case x of-            [True] -> [False,True]-            _ -> [False]-    , \x -> case x of-            [True] -> [True,False]-            _ -> [False]-    , \x -> case x of-            [True] -> [True,True]-            _ -> [False]-    , \x -> case x of-            [] -> []-            [False] -> [True]-            _ -> [False]-    , \x -> case x of-            [] -> [True]-            [False] -> []-            _ -> [False]-    , \x -> case x of-            [] -> []-            [True] -> [True]-            _ -> [False]-    , \x -> case x of-            [] -> [True]-            [True] -> []-            _ -> [False]-    , \x -> case x of-            [False,False] -> [True]-            _ -> [False]-    , \x -> case x of-            [False,True] -> [True]-            _ -> [False]-    , \x -> case x of-            [True,False] -> [True]-            _ -> [False]-    , \x -> case x of-            [True,True] -> [True]-            _ -> [False]-    , \x -> case x of-            [] -> []-            [False,False] -> []-            _ -> [False]-    , \x -> case x of-            [] -> []-            [False,True] -> []-            _ -> [False]-    , \x -> case x of-            [] -> []-            [True,False] -> []-            _ -> [False]-    , \x -> case x of-            [] -> []-            [True,True] -> []-            _ -> [False]-    , \x -> case x of-            [False] -> []-            [True] -> []-            _ -> [False]-    , \x -> case x of-            [False,False,False] -> []-            _ -> [False]-    , \x -> case x of-            [False,False,True] -> []-            _ -> [False]-    , \x -> case x of-            [False,True,False] -> []-            _ -> [False]-    , \x -> case x of-            [False,True,True] -> []-            _ -> [False]-    , \x -> case x of-            [True,False,False] -> []-            _ -> [False]-    , \x -> case x of-            [True,False,True] -> []-            _ -> [False]-    , \x -> case x of-            [True,True,False] -> []-            _ -> [False]-    , \x -> case x of-            [True,True,True] -> []-            _ -> [False]-    , \x -> case x of-            [] -> [False,False,False]-            _ -> [True]-    , \x -> case x of-            [] -> [False,False,True]-            _ -> [True]-    , \x -> case x of-            [] -> [False,True,False]-            _ -> [True]-    , \x -> case x of-            [] -> [False,True,True]-            _ -> [True]-    , \x -> case x of-            [] -> [True,False,False]-            _ -> [True]-    , \x -> case x of-            [] -> [True,False,True]-            _ -> [True]-    , \x -> case x of-            [] -> [True,True,False]-            _ -> [True]-    , \x -> case x of-            [] -> [True,True,True]-            _ -> [True]-    , \x -> case x of-            [False] -> [False,False]-            _ -> [True]-    , \x -> case x of-            [False] -> [False,True]-            _ -> [True]-    , \x -> case x of-            [False] -> [True,False]-            _ -> [True]-    , \x -> case x of-            [False] -> [True,True]-            _ -> [True]-    , \x -> case x of-            [True] -> [False,False]-            _ -> [True]-    , \x -> case x of-            [True] -> [False,True]-            _ -> [True]-    , \x -> case x of-            [True] -> [True,False]-            _ -> [True]-    , \x -> case x of-            [True] -> [True,True]-            _ -> [True]-    , \x -> case x of-            [] -> []-            [False] -> [False]-            _ -> [True]-    , \x -> case x of-            [] -> [False]-            [False] -> []-            _ -> [True]-    , \x -> case x of-            [] -> []-            [True] -> [False]-            _ -> [True]-    , \x -> case x of-            [] -> [False]-            [True] -> []-            _ -> [True]-    , \x -> case x of-            [False,False] -> [False]-            _ -> [True]-    , \x -> case x of-            [False,True] -> [False]-            _ -> [True]-    , \x -> case x of-            [True,False] -> [False]-            _ -> [True]-    , \x -> case x of-            [True,True] -> [False]-            _ -> [True]-    , \x -> case x of-            [] -> []-            [False,False] -> []-            _ -> [True]-    , \x -> case x of-            [] -> []-            [False,True] -> []-            _ -> [True]-    , \x -> case x of-            [] -> []-            [True,False] -> []-            _ -> [True]-    , \x -> case x of-            [] -> []-            [True,True] -> []-            _ -> [True]-    , \x -> case x of-            [False] -> []-            [True] -> []-            _ -> [True]-    , \x -> case x of-            [False,False,False] -> []-            _ -> [True]-    , \x -> case x of-            [False,False,True] -> []-            _ -> [True]-    , \x -> case x of-            [False,True,False] -> []-            _ -> [True]-    , \x -> case x of-            [False,True,True] -> []-            _ -> [True]-    , \x -> case x of-            [True,False,False] -> []-            _ -> [True]-    , \x -> case x of-            [True,False,True] -> []-            _ -> [True]-    , \x -> case x of-            [True,True,False] -> []-            _ -> [True]-    , \x -> case x of-            [True,True,True] -> []-            _ -> [True]-    , \x -> case x of-            [] -> [False,True]-            _ -> [False,False]-    , \x -> case x of-            [] -> [True,False]-            _ -> [False,False]-    , \x -> case x of-            [] -> [True,True]-            _ -> [False,False]-    , \x -> case x of-            [False] -> [False]-            _ -> [False,False]-    , \x -> case x of-            [False] -> [True]-            _ -> [False,False]-    , \x -> case x of-            [True] -> [False]-            _ -> [False,False]-    , \x -> case x of-            [True] -> [True]-            _ -> [False,False]-    , \x -> case x of-            [] -> []-            [False] -> []-            _ -> [False,False]-    , \x -> case x of-            [] -> []-            [True] -> []-            _ -> [False,False]-    , \x -> case x of-            [False,False] -> []-            _ -> [False,False]-    , \x -> case x of-            [False,True] -> []-            _ -> [False,False]-    , \x -> case x of-            [True,False] -> []-            _ -> [False,False]-    , \x -> case x of-            [True,True] -> []-            _ -> [False,False]-    , \x -> case x of-            [] -> [False,False]-            _ -> [False,True]-    , \x -> case x of-            [] -> [True,False]-            _ -> [False,True]-    , \x -> case x of-            [] -> [True,True]-            _ -> [False,True]-    , \x -> case x of-            [False] -> [False]-            _ -> [False,True]-    , \x -> case x of-            [False] -> [True]-            _ -> [False,True]-    , \x -> case x of-            [True] -> [False]-            _ -> [False,True]-    , \x -> case x of-            [True] -> [True]-            _ -> [False,True]-    , \x -> case x of-            [] -> []-            [False] -> []-            _ -> [False,True]-    , \x -> case x of-            [] -> []-            [True] -> []-            _ -> [False,True]-    , \x -> case x of-            [False,False] -> []-            _ -> [False,True]-    , \x -> case x of-            [False,True] -> []-            _ -> [False,True]-    , \x -> case x of-            [True,False] -> []-            _ -> [False,True]-    , \x -> case x of-            [True,True] -> []-            _ -> [False,True]-    , \x -> case x of-            [] -> [False,False]-            _ -> [True,False]-    , \x -> case x of-            [] -> [False,True]-            _ -> [True,False]-    , \x -> case x of-            [] -> [True,True]-            _ -> [True,False]-    , \x -> case x of-            [False] -> [False]-            _ -> [True,False]-    , \x -> case x of-            [False] -> [True]-            _ -> [True,False]-    , \x -> case x of-            [True] -> [False]-            _ -> [True,False]-    , \x -> case x of-            [True] -> [True]-            _ -> [True,False]-    , \x -> case x of-            [] -> []-            [False] -> []-            _ -> [True,False]-    , \x -> case x of-            [] -> []-            [True] -> []-            _ -> [True,False]-    , \x -> case x of-            [False,False] -> []-            _ -> [True,False]-    , \x -> case x of-            [False,True] -> []-            _ -> [True,False]-    , \x -> case x of-            [True,False] -> []-            _ -> [True,False]-    , \x -> case x of-            [True,True] -> []-            _ -> [True,False]-    , \x -> case x of-            [] -> [False,False]-            _ -> [True,True]-    , \x -> case x of-            [] -> [False,True]-            _ -> [True,True]-    , \x -> case x of-            [] -> [True,False]-            _ -> [True,True]-    , \x -> case x of-            [False] -> [False]-            _ -> [True,True]-    , \x -> case x of-            [False] -> [True]-            _ -> [True,True]-    , \x -> case x of-            [True] -> [False]-            _ -> [True,True]-    , \x -> case x of-            [True] -> [True]-            _ -> [True,True]-    , \x -> case x of-            [] -> []-            [False] -> []-            _ -> [True,True]-    , \x -> case x of-            [] -> []-            [True] -> []-            _ -> [True,True]-    , \x -> case x of-            [False,False] -> []-            _ -> [True,True]-    , \x -> case x of-            [False,True] -> []-            _ -> [True,True]-    , \x -> case x of-            [True,False] -> []-            _ -> [True,True]-    , \x -> case x of-            [True,True] -> []-            _ -> [True,True]-    , \x -> case x of-            [] -> [False]-            _ -> [False,False,False]-    , \x -> case x of-            [] -> [True]-            _ -> [False,False,False]-    , \x -> case x of-            [False] -> []-            _ -> [False,False,False]-    , \x -> case x of-            [True] -> []-            _ -> [False,False,False]-    , \x -> case x of-            [] -> [False]-            _ -> [False,False,True]-    , \x -> case x of-            [] -> [True]-            _ -> [False,False,True]-    , \x -> case x of-            [False] -> []-            _ -> [False,False,True]-    , \x -> case x of-            [True] -> []-            _ -> [False,False,True]-    , \x -> case x of-            [] -> [False]-            _ -> [False,True,False]-    , \x -> case x of-            [] -> [True]-            _ -> [False,True,False]-    , \x -> case x of-            [False] -> []-            _ -> [False,True,False]-    , \x -> case x of-            [True] -> []-            _ -> [False,True,False]-    , \x -> case x of-            [] -> [False]-            _ -> [False,True,True]-    , \x -> case x of-            [] -> [True]-            _ -> [False,True,True]-    , \x -> case x of-            [False] -> []-            _ -> [False,True,True]-    , \x -> case x of-            [True] -> []-            _ -> [False,True,True]-    , \x -> case x of-            [] -> [False]-            _ -> [True,False,False]-    , \x -> case x of-            [] -> [True]-            _ -> [True,False,False]-    , \x -> case x of-            [False] -> []-            _ -> [True,False,False]-    , \x -> case x of-            [True] -> []-            _ -> [True,False,False]-    , \x -> case x of-            [] -> [False]-            _ -> [True,False,True]-    , \x -> case x of-            [] -> [True]-            _ -> [True,False,True]-    , \x -> case x of-            [False] -> []-            _ -> [True,False,True]-    , \x -> case x of-            [True] -> []-            _ -> [True,False,True]-    , \x -> case x of-            [] -> [False]-            _ -> [True,True,False]-    , \x -> case x of-            [] -> [True]-            _ -> [True,True,False]-    , \x -> case x of-            [False] -> []-            _ -> [True,True,False]-    , \x -> case x of-            [True] -> []-            _ -> [True,True,False]-    , \x -> case x of-            [] -> [False]-            _ -> [True,True,True]-    , \x -> case x of-            [] -> [True]-            _ -> [True,True,True]-    , \x -> case x of-            [False] -> []-            _ -> [True,True,True]-    , \x -> case x of-            [True] -> []-            _ -> [True,True,True]-    , \x -> case x of-            [] -> []-            _ -> [False,False,False,False]-    , \x -> case x of-            [] -> []-            _ -> [False,False,False,True]-    , \x -> case x of-            [] -> []-            _ -> [False,False,True,False]-    , \x -> case x of-            [] -> []-            _ -> [False,False,True,True]-    , \x -> case x of-            [] -> []-            _ -> [False,True,False,False]-    , \x -> case x of-            [] -> []-            _ -> [False,True,False,True]-    , \x -> case x of-            [] -> []-            _ -> [False,True,True,False]-    , \x -> case x of-            [] -> []-            _ -> [False,True,True,True]-    , \x -> case x of-            [] -> []-            _ -> [True,False,False,False]-    , \x -> case x of-            [] -> []-            _ -> [True,False,False,True]-    , \x -> case x of-            [] -> []-            _ -> [True,False,True,False]-    , \x -> case x of-            [] -> []-            _ -> [True,False,True,True]-    , \x -> case x of-            [] -> []-            _ -> [True,True,False,False]-    , \x -> case x of-            [] -> []-            _ -> [True,True,False,True]-    , \x -> case x of-            [] -> []-            _ -> [True,True,True,False]-    , \x -> case x of-            [] -> []-            _ -> [True,True,True,True]-    , \_ -> [False,False,False,False,False]-    , \_ -> [False,False,False,False,True]-    , \_ -> [False,False,False,True,False]-    , \_ -> [False,False,False,True,True]-    , \_ -> [False,False,True,False,False]-    , \_ -> [False,False,True,False,True]-    , \_ -> [False,False,True,True,False]-    , \_ -> [False,False,True,True,True]-    , \_ -> [False,True,False,False,False]-    , \_ -> [False,True,False,False,True]-    , \_ -> [False,True,False,True,False]-    , \_ -> [False,True,False,True,True]-    , \_ -> [False,True,True,False,False]-    , \_ -> [False,True,True,False,True]-    , \_ -> [False,True,True,True,False]-    , \_ -> [False,True,True,True,True]-    , \_ -> [True,False,False,False,False]-    , \_ -> [True,False,False,False,True]-    , \_ -> [True,False,False,True,False]-    , \_ -> [True,False,False,True,True]-    , \_ -> [True,False,True,False,False]-    , \_ -> [True,False,True,False,True]-    , \_ -> [True,False,True,True,False]-    , \_ -> [True,False,True,True,True]-    , \_ -> [True,True,False,False,False]-    , \_ -> [True,True,False,False,True]-    , \_ -> [True,True,False,True,False]-    , \_ -> [True,True,False,True,True]-    , \_ -> [True,True,True,False,False]-    , \_ -> [True,True,True,False,True]-    , \_ -> [True,True,True,True,False]-    , \_ -> [True,True,True,True,True]     ]   , ...   ]
test/error.hs view
@@ -39,6 +39,71 @@   , witness         n someOthers == Just ["2","2"]   , witnesses  (20*n) someOthers == (map.map) show [[2,2],[2,4],[3,3]                                                    ,[2,8],[3,9],[3,27]]++  , errorToNothing ()                   ==  Just ()+  , errorToNothing (undefined   :: ())  ==  Nothing+  , errorToNothing (error "err" :: ())  ==  Nothing++  , errorToNothing False                  ==  Just False+  , errorToNothing True                   ==  Just True+  , errorToNothing (undefined   :: Bool)  ==  Nothing+  , errorToNothing (error "err" :: Bool)  ==  Nothing++  , errorToNothing (0           :: Int)  ==  Just 0+  , errorToNothing (1           :: Int)  ==  Just 1+  , errorToNothing (undefined   :: Int)  ==  Nothing+  , errorToNothing (error "err" :: Int)  ==  Nothing+  , errorToNothing (1 `div` 0   :: Int)  ==  Nothing++  , errorToNothing (head "abc")  ==  Just 'a'+  , errorToNothing (tail "abc")  ==  Just "bc"+  , errorToNothing (head "")  ==  Nothing+  , errorToNothing (tail "")  ==  Nothing++  , errorToLeft ()                   ==  Right ()+  , errorToLeft (undefined   :: ())  ==  Left "Prelude.undefined"+  , errorToLeft (error "err" :: ())  ==  Left "err"++  , errorToLeft False                  ==  Right False+  , errorToLeft True                   ==  Right True+  , errorToLeft (undefined   :: Bool)  ==  Left "Prelude.undefined"+  , errorToLeft (error "err" :: Bool)  ==  Left "err"++  , errorToLeft (0           :: Int)  ==  Right 0+  , errorToLeft (1           :: Int)  ==  Right 1+  , errorToLeft (undefined   :: Int)  ==  Left "Prelude.undefined"+  , errorToLeft (error "err" :: Int)  ==  Left "err"+  , errorToLeft (1 `div` 0   :: Int)  ==  Left "divide by zero"++  , errorToLeft (head "abc")  ==  Right 'a'+  , errorToLeft (tail "abc")  ==  Right "bc"++  , errorToLeft (head "")  ==  Left "Prelude.head: empty list" ||    -- GHC+    errorToLeft (head "")  ==  Left "pattern match failure: head []" -- Hugs++  , errorToLeft (tail "")  ==  Left "Prelude.tail: empty list" ||    -- GHC+    errorToLeft (tail "")  ==  Left "pattern match failure: tail []" -- Hugs++  , (1 `div` 1  ?==?  2 `div` 2)   == True+  , (1 `div` 1  ?==?  1 `div` 2)   == False+  , (1 `div` 1  ?==?  1 `div` 0)   == False+  , (6 `mod` 0  ?==?  2 `div` 0)   == True+  , (head [] ?==? tail ([]::[()])) == True+  , (error "a"  ?==?  (error "a"::())) == True+  , (error "a"  ?==?  (error "b"::())) == True++  , (1 `div` 1  !==!  2 `div` 2)   == True+  , (1 `div` 1  !==!  1 `div` 2)   == False+  , (1 `div` 1  !==!  1 `div` 0)   == False+  , (6 `mod` 0  !==!  2 `div` 0)   == True+  , (head [] !==! tail ([]::[()])) == False+  , (error "a"  !==!  (error "a"::())) == True+  , (error "a"  !==!  (error "b"::())) == False++  , holds n $ \x y -> (x !==! y)  ==  (x == (y::Int))+  , holds n $ \x y -> (x !==! y)  ==  (x == (y::Bool))+  , holds n $ \x y -> (x ?==? y)  ==  (x == (y::Int))+  , holds n $ \x y -> (x ?==? y)  ==  (x == (y::Bool))   ]  prop_sortMinE :: [Nat] -> Bool
test/sdist view
@@ -2,7 +2,7 @@ # # test/sdist: tests the package generated by "cabal sdist". #-# Copyright (c) 2015-2020 Rudy Matela.+# Copyright (c) 2015-2021 Rudy Matela. # Distributed under the 3-Clause BSD licence.  set -xe