leancheck 0.8.0 → 0.9.0
raw patch · 28 files changed
+1437/−28 lines, 28 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Test.LeanCheck.Core: instance Test.LeanCheck.Core.Listable a => Test.LeanCheck.Core.Listable (GHC.Base.Maybe a)
- Test.LeanCheck.Function.ShowFunction: instance GHC.Show.Show a => Test.LeanCheck.Function.ShowFunction.ShowFunction (GHC.Base.Maybe a)
+ Test.LeanCheck.Basic: instance (GHC.Float.RealFloat a, Test.LeanCheck.Core.Listable a) => Test.LeanCheck.Core.Listable (Data.Complex.Complex a)
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CBool
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CChar
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CClock
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CDouble
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CFloat
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CInt
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CIntMax
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CIntPtr
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CLLong
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CLong
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CPtrdiff
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CSChar
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CSUSeconds
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CShort
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CSigAtomic
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CSize
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CTime
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CUChar
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CUInt
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CUIntMax
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CUIntPtr
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CULLong
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CULong
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CUSeconds
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CUShort
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable Foreign.C.Types.CWchar
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.IO.Device.SeekMode
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.IO.Exception.ExitCode
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.IO.Handle.Types.BufferMode
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.IO.IOMode.IOMode
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Int.Int16
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Int.Int32
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Int.Int64
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Int.Int8
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Unicode.GeneralCategory
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Word.Word16
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Word.Word32
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Word.Word64
+ Test.LeanCheck.Basic: instance Test.LeanCheck.Core.Listable GHC.Word.Word8
+ Test.LeanCheck.Core: instance Test.LeanCheck.Core.Listable a => Test.LeanCheck.Core.Listable (GHC.Maybe.Maybe a)
+ Test.LeanCheck.Function.ShowFunction: instance (GHC.Float.RealFloat a, GHC.Show.Show a) => Test.LeanCheck.Function.ShowFunction.ShowFunction (Data.Complex.Complex a)
+ Test.LeanCheck.Function.ShowFunction: instance (GHC.Real.Integral a, GHC.Show.Show a) => Test.LeanCheck.Function.ShowFunction.ShowFunction (GHC.Real.Ratio a)
+ Test.LeanCheck.Function.ShowFunction: instance (GHC.Show.Show a, GHC.Show.Show b) => Test.LeanCheck.Function.ShowFunction.ShowFunction (Test.LeanCheck.Utils.Types.Map a b)
+ Test.LeanCheck.Function.ShowFunction: instance (GHC.Show.Show a, GHC.Show.Show b, GHC.Show.Show c, GHC.Show.Show d, GHC.Show.Show e, GHC.Show.Show f, GHC.Show.Show g, GHC.Show.Show h, GHC.Show.Show i) => Test.LeanCheck.Function.ShowFunction.ShowFunction (a, b, c, d, e, f, g, h, i)
+ Test.LeanCheck.Function.ShowFunction: instance (GHC.Show.Show a, GHC.Show.Show b, GHC.Show.Show c, GHC.Show.Show d, GHC.Show.Show e, GHC.Show.Show f, GHC.Show.Show g, GHC.Show.Show h, GHC.Show.Show i, GHC.Show.Show j) => Test.LeanCheck.Function.ShowFunction.ShowFunction (a, b, c, d, e, f, g, h, i, j)
+ Test.LeanCheck.Function.ShowFunction: instance (GHC.Show.Show a, GHC.Show.Show b, GHC.Show.Show c, GHC.Show.Show d, GHC.Show.Show e, GHC.Show.Show f, GHC.Show.Show g, GHC.Show.Show h, GHC.Show.Show i, GHC.Show.Show j, GHC.Show.Show k) => Test.LeanCheck.Function.ShowFunction.ShowFunction (a, b, c, d, e, f, g, h, i, j, k)
+ Test.LeanCheck.Function.ShowFunction: instance (GHC.Show.Show a, GHC.Show.Show b, GHC.Show.Show c, GHC.Show.Show d, GHC.Show.Show e, GHC.Show.Show f, GHC.Show.Show g, GHC.Show.Show h, GHC.Show.Show i, GHC.Show.Show j, GHC.Show.Show k, GHC.Show.Show l) => Test.LeanCheck.Function.ShowFunction.ShowFunction (a, b, c, d, e, f, g, h, i, j, k, l)
+ Test.LeanCheck.Function.ShowFunction: instance GHC.Show.Show a => Test.LeanCheck.Function.ShowFunction.ShowFunction (GHC.Maybe.Maybe a)
+ Test.LeanCheck.Function.ShowFunction: instance GHC.Show.Show a => Test.LeanCheck.Function.ShowFunction.ShowFunction (Test.LeanCheck.Utils.Types.Bag a)
+ Test.LeanCheck.Function.ShowFunction: instance GHC.Show.Show a => Test.LeanCheck.Function.ShowFunction.ShowFunction (Test.LeanCheck.Utils.Types.NoDup a)
+ Test.LeanCheck.Function.ShowFunction: instance GHC.Show.Show a => Test.LeanCheck.Function.ShowFunction.ShowFunction (Test.LeanCheck.Utils.Types.Set a)
+ Test.LeanCheck.Function.ShowFunction: instance GHC.Show.Show a => Test.LeanCheck.Function.ShowFunction.ShowFunction (Test.LeanCheck.Utils.Types.X a)
+ Test.LeanCheck.Function.ShowFunction: instance GHC.Show.Show a => Test.LeanCheck.Function.ShowFunction.ShowFunction (Test.LeanCheck.Utils.Types.Xs a)
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CBool
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CChar
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CClock
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CDouble
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CFloat
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CInt
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CIntMax
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CIntPtr
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CLLong
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CLong
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CPtrdiff
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CSChar
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CSUSeconds
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CShort
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CSigAtomic
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CSize
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CTime
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CUChar
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CUInt
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CUIntMax
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CUIntPtr
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CULLong
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CULong
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CUSeconds
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CUShort
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Foreign.C.Types.CWchar
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.IO.Device.SeekMode
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.IO.Exception.ExitCode
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.IO.Handle.Types.BufferMode
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.IO.IOMode.IOMode
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Int.Int16
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Int.Int32
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Int.Int64
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Int.Int8
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Types.Word
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Unicode.GeneralCategory
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Word.Word16
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Word.Word32
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Word.Word64
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction GHC.Word.Word8
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Alpha
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.AlphaNum
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.AlphaNums
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Alphas
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Digit
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Digits
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Letter
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Letters
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Lower
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Lowers
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Natural
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Space
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Spaces
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Upper
+ Test.LeanCheck.Function.ShowFunction: instance Test.LeanCheck.Function.ShowFunction.ShowFunction Test.LeanCheck.Utils.Types.Uppers
- Test.LeanCheck.Utils.TypeBinding: (-:>) :: (a -> b) -> a -> (a -> b)
+ Test.LeanCheck.Utils.TypeBinding: (-:>) :: (a -> b) -> a -> a -> b
- Test.LeanCheck.Utils.TypeBinding: (->:) :: (a -> b) -> b -> (a -> b)
+ Test.LeanCheck.Utils.TypeBinding: (->:) :: (a -> b) -> b -> a -> b
- Test.LeanCheck.Utils.TypeBinding: (->:>) :: (a -> b -> c) -> b -> (a -> b -> c)
+ Test.LeanCheck.Utils.TypeBinding: (->:>) :: (a -> b -> c) -> b -> a -> b -> c
- Test.LeanCheck.Utils.TypeBinding: (->>:) :: (a -> b -> c) -> c -> (a -> b -> c)
+ Test.LeanCheck.Utils.TypeBinding: (->>:) :: (a -> b -> c) -> c -> a -> b -> c
- Test.LeanCheck.Utils.TypeBinding: (->>:>) :: (a -> b -> c -> d) -> c -> (a -> b -> c -> d)
+ Test.LeanCheck.Utils.TypeBinding: (->>:>) :: (a -> b -> c -> d) -> c -> a -> b -> c -> d
- Test.LeanCheck.Utils.TypeBinding: (->>>:) :: (a -> b -> c -> d) -> d -> (a -> b -> c -> d)
+ Test.LeanCheck.Utils.TypeBinding: (->>>:) :: (a -> b -> c -> d) -> d -> a -> b -> c -> d
- Test.LeanCheck.Utils.TypeBinding: (->>>:>) :: (a -> b -> c -> d -> e) -> d -> (a -> b -> c -> d -> e)
+ Test.LeanCheck.Utils.TypeBinding: (->>>:>) :: (a -> b -> c -> d -> e) -> d -> a -> b -> c -> d -> e
- Test.LeanCheck.Utils.TypeBinding: (->>>>:) :: (a -> b -> c -> d -> e) -> e -> (a -> b -> c -> d -> e)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>:) :: (a -> b -> c -> d -> e) -> e -> a -> b -> c -> d -> e
- Test.LeanCheck.Utils.TypeBinding: (->>>>:>) :: (a -> b -> c -> d -> e -> f) -> e -> (a -> b -> c -> d -> e -> f)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>:>) :: (a -> b -> c -> d -> e -> f) -> e -> a -> b -> c -> d -> e -> f
- Test.LeanCheck.Utils.TypeBinding: (->>>>>:) :: (a -> b -> c -> d -> e -> f) -> f -> (a -> b -> c -> d -> e -> f)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>:) :: (a -> b -> c -> d -> e -> f) -> f -> a -> b -> c -> d -> e -> f
- Test.LeanCheck.Utils.TypeBinding: (->>>>>:>) :: (a -> b -> c -> d -> e -> f -> g) -> f -> (a -> b -> c -> d -> e -> f -> g)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>:>) :: (a -> b -> c -> d -> e -> f -> g) -> f -> a -> b -> c -> d -> e -> f -> g
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>:) :: (a -> b -> c -> d -> e -> f -> g) -> g -> (a -> b -> c -> d -> e -> f -> g)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>:) :: (a -> b -> c -> d -> e -> f -> g) -> g -> a -> b -> c -> d -> e -> f -> g
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h) -> g -> (a -> b -> c -> d -> e -> f -> g -> h)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h) -> g -> a -> b -> c -> d -> e -> f -> g -> h
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h) -> h -> (a -> b -> c -> d -> e -> f -> g -> h)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h) -> h -> a -> b -> c -> d -> e -> f -> g -> h
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i) -> h -> (a -> b -> c -> d -> e -> f -> g -> h -> i)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i) -> h -> a -> b -> c -> d -> e -> f -> g -> h -> i
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i) -> i -> (a -> b -> c -> d -> e -> f -> g -> h -> i)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i) -> i -> a -> b -> c -> d -> e -> f -> g -> h -> i
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> i -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> i -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> j -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> j -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> j -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> j -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> k -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> k -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) -> k -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) -> k -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) -> l -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) -> l -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) -> m -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>>:>) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) -> m -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m
- Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) -> m -> (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m)
+ Test.LeanCheck.Utils.TypeBinding: (->>>>>>>>>>>>:) :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) -> m -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m
- Test.LeanCheck.Utils.TypeBinding: (>-) :: a -> b -> (a -> b)
+ Test.LeanCheck.Utils.TypeBinding: (>-) :: a -> b -> a -> b
Files
- LICENSE +1/−1
- Makefile +30/−2
- README.md +17/−0
- bench/tiers.hs +23/−0
- changelog.md +12/−0
- doc/leancheck.svg +121/−0
- doc/tutorial.md +5/−0
- eg/overflow.hs +0/−10
- leancheck.cabal +5/−3
- src/Test/LeanCheck.hs +1/−1
- src/Test/LeanCheck/Basic.hs +111/−6
- src/Test/LeanCheck/Error.hs +13/−3
- src/Test/LeanCheck/Function.hs +8/−0
- src/Test/LeanCheck/Function/ShowFunction.hs +106/−0
- test/diff/tiers-ComplexDouble.out +279/−0
- test/diff/tiers-Int2.out +14/−0
- test/diff/tiers-Int3.out +18/−0
- test/diff/tiers-Int4.out +26/−0
- test/diff/tiers-Int8.out +266/−0
- test/diff/tiers-Nat2.out +12/−0
- test/diff/tiers-Nat3.out +13/−0
- test/diff/tiers-Nat4.out +14/−0
- test/diff/tiers-Word2.out +14/−0
- test/diff/tiers-Word3.out +18/−0
- test/diff/tiers-Word4.out +26/−0
- test/diff/tiers-Word8.out +266/−0
- test/error.hs +1/−1
- test/main.hs +17/−1
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2015-2018, Rudy Matela+Copyright (c) 2015-2019, Rudy Matela All rights reserved.
Makefile view
@@ -73,13 +73,13 @@ hugs: src/Test/LeanCheck.hugs hugs-test: \+ test/main.runhugs \ test/fun.runhugs \ test/io.runhugs \ test/operators.runhugs \ test/stats.runhugs \ test/tiers.runhugs \- test/main.runhugs-# test/error.runhugs # TODO: make this pass+ test/error.runhugs # test/funshow.runhugs # TODO: make this pass # test/types.runhugs # TODO: make this pass @@ -140,6 +140,20 @@ ./bench/tiers "Float" | diff -rud test/diff/tiers-Float.out - ./bench/tiers "Double" | diff -rud test/diff/tiers-Double.out - ./bench/tiers "Rational" | diff -rud test/diff/tiers-Rational.out -+ # fixed width integer types+ ./bench/tiers "Nat2" | diff -rud test/diff/tiers-Nat2.out -+ ./bench/tiers "Nat3" | diff -rud test/diff/tiers-Nat3.out -+ ./bench/tiers "Nat4" | diff -rud test/diff/tiers-Nat4.out -+ ./bench/tiers "Word2" | diff -rud test/diff/tiers-Word2.out -+ ./bench/tiers "Word3" | diff -rud test/diff/tiers-Word3.out -+ ./bench/tiers "Word4" 64 | diff -rud test/diff/tiers-Word4.out -+ ./bench/tiers "Word8" 256 | diff -rud test/diff/tiers-Word8.out -+ ./bench/tiers "Int2" | diff -rud test/diff/tiers-Int2.out -+ ./bench/tiers "Int3" | diff -rud test/diff/tiers-Int3.out -+ ./bench/tiers "Int4" 64 | diff -rud test/diff/tiers-Int4.out -+ ./bench/tiers "Int8" 256 | diff -rud test/diff/tiers-Int8.out -+ # complex numbers+ ./bench/tiers "Complex Double" | diff -rud test/diff/tiers-ComplexDouble.out - # list s ./bench/tiers "[()]" | diff -rud test/diff/tiers-Us.out - ./bench/tiers "[Int]" 6 | diff -rud test/diff/tiers-Ints.out -@@ -194,6 +208,20 @@ ./bench/tiers "Float" > test/diff/tiers-Float.out ./bench/tiers "Double" > test/diff/tiers-Double.out ./bench/tiers "Rational" > test/diff/tiers-Rational.out+ # fixed width integer types+ ./bench/tiers "Nat2" > test/diff/tiers-Nat2.out+ ./bench/tiers "Nat3" > test/diff/tiers-Nat3.out+ ./bench/tiers "Nat4" > test/diff/tiers-Nat4.out+ ./bench/tiers "Word2" > test/diff/tiers-Word2.out+ ./bench/tiers "Word3" > test/diff/tiers-Word3.out+ ./bench/tiers "Word4" 64 > test/diff/tiers-Word4.out+ ./bench/tiers "Word8" 256 > test/diff/tiers-Word8.out+ ./bench/tiers "Int2" > test/diff/tiers-Int2.out+ ./bench/tiers "Int3" > test/diff/tiers-Int3.out+ ./bench/tiers "Int4" 64 > test/diff/tiers-Int4.out+ ./bench/tiers "Int8" 256 > test/diff/tiers-Int8.out+ # complex numbers+ ./bench/tiers "Complex Double" > test/diff/tiers-ComplexDouble.out # lists ./bench/tiers "[()]" > test/diff/tiers-Us.out ./bench/tiers "[Int]" 6 > test/diff/tiers-Ints.out
README.md view
@@ -6,6 +6,8 @@ [![LeanCheck on Stackage LTS][stackage-lts-badge]][leancheck-on-stackage-lts] [![LeanCheck on Stackage Nightly][stackage-nightly-badge]][leancheck-on-stackage-nightly] +![LeanCheck logo][leancheck-logo]+ LeanCheck is a simple enumerative [property-based testing] library. Properties are defined as Haskell functions returning a boolean value which should be `True` for all possible choices of argument values. LeanCheck applies@@ -142,6 +144,15 @@ check source comments or haddock documentation for details. +Standard Listable Instances+---------------------------++LeanCheck comes out-of-the-box with [`Listable`] instances for all types in the+[Haskell 2010 Language Report] with [the intentional exception of a few types].+The [leancheck-instances] package aims to support types in the+[Haskell Platform] -- `$ cabal install leancheck-instances`.++ Providers for Tasty, test-framework and Hspec --------------------------------------------- @@ -198,6 +209,12 @@ [LeanCheck provider for Tasty]: https://hackage.haskell.org/package/tasty-leancheck [LeanCheck provider for test-framework]: https://hackage.haskell.org/package/test-framework-leancheck [LeanCheck provider for Hspec]: https://hackage.haskell.org/package/hspec-leancheck+[leancheck-instances]: https://hackage.haskell.org/package/hspec-leancheck+[the intentional exception of a few types]: https://hackage.haskell.org/package/leancheck/docs/Test-LeanCheck-Basic.html+[Haskell 2010 Language Report]: https://www.haskell.org/onlinereport/haskell2010/+[Haskell Platform]: https://www.haskell.org/platform/++[leancheck-logo]: https://github.com/rudymatela/leancheck/raw/master/doc/leancheck.svg?sanitize=true [build-status]: https://travis-ci.org/rudymatela/leancheck.svg?branch=master [build-log]: https://travis-ci.org/rudymatela/leancheck
bench/tiers.hs view
@@ -10,6 +10,9 @@ import System.Environment import Data.List (intercalate, nub) import Data.Ratio ((%))+import Data.Int+import Data.Word+import Data.Complex dropEmptyTiersTail :: [[a]] -> [[a]] dropEmptyTiersTail ([]:[]:[]: []:[]:[]: _) = []@@ -86,6 +89,26 @@ "Float" -> put t n (u :: Float ) "Double" -> put t n (u :: Double ) "Rational" -> put t n (u :: Rational )+ -- fixed width integer types+ "Nat2" -> put t n (u :: Nat2 )+ "Nat3" -> put t n (u :: Nat3 )+ "Nat4" -> put t n (u :: Nat4 )+ "Word2" -> put t n (u :: Word2 )+ "Word3" -> put t n (u :: Word3 )+ "Word4" -> put t n (u :: Word4 )+ "Word8" -> put t n (u :: Word8 )+ "Word16" -> put t n (u :: Word16 )+ "Word32" -> put t n (u :: Word32 )+ "Word64" -> put t n (u :: Word64 )+ "Int2" -> put t n (u :: Int2 )+ "Int3" -> put t n (u :: Int3 )+ "Int4" -> put t n (u :: Int4 )+ "Int8" -> put t n (u :: Int8 )+ "Int16" -> put t n (u :: Int16 )+ "Int32" -> put t n (u :: Int32 )+ "Int64" -> put t n (u :: Int64 )+ -- complex numbers+ "Complex Double" -> put t n (u :: Complex Double ) -- lists "[()]" -> put t n (u :: [()] ) "[Int]" -> put t n (u :: [Int] )
changelog.md view
@@ -1,6 +1,18 @@ Changelog for LeanCheck ======================= +v0.9.0+------++* logo for LeanCheck;+* `Listable` instances to most types in the Haskell 2010 Language Report:+ - `Word<n>`;+ - `Int<n>`;+ - `Complex`;+ - etc...;+* minor improvements in documentation and README.++ v0.8.0 ------
+ doc/leancheck.svg view
@@ -0,0 +1,121 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<!-- Created with Inkscape (http://www.inkscape.org/) -->++<svg+ xmlns:dc="http://purl.org/dc/elements/1.1/"+ xmlns:cc="http://creativecommons.org/ns#"+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"+ xmlns:svg="http://www.w3.org/2000/svg"+ xmlns="http://www.w3.org/2000/svg"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"+ width="75mm"+ height="60mm"+ viewBox="0 0 75 60.000001"+ version="1.1"+ id="svg857"+ inkscape:version="0.92.2 2405546, 2018-03-11"+ sodipodi:docname="leancheck.svg">+ <title+ id="title834">LeanCheck</title>+ <defs+ id="defs851" />+ <sodipodi:namedview+ id="base"+ pagecolor="#ffffff"+ bordercolor="#666666"+ borderopacity="1.0"+ inkscape:pageopacity="0"+ inkscape:pageshadow="2"+ inkscape:zoom="2"+ inkscape:cx="152.91219"+ inkscape:cy="161.03297"+ inkscape:document-units="mm"+ inkscape:current-layer="layer1"+ showgrid="false"+ fit-margin-top="0"+ fit-margin-left="0"+ fit-margin-right="0"+ fit-margin-bottom="0"+ inkscape:window-width="1150"+ inkscape:window-height="1063"+ inkscape:window-x="1366"+ inkscape:window-y="15"+ inkscape:window-maximized="0"+ units="mm" />+ <metadata+ id="metadata854">+ <rdf:RDF>+ <cc:Work+ rdf:about="">+ <dc:format>image/svg+xml</dc:format>+ <dc:type+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />+ <dc:title>LeanCheck</dc:title>+ <cc:license+ rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />+ <dc:date>2018-11-18</dc:date>+ <dc:creator>+ <cc:Agent>+ <dc:title>Rudy Matela</dc:title>+ </cc:Agent>+ </dc:creator>+ <dc:subject>+ <rdf:Bag>+ <rdf:li>LeanCheck</rdf:li>+ <rdf:li>logo</rdf:li>+ <rdf:li>testing</rdf:li>+ <rdf:li>test</rdf:li>+ <rdf:li>property-based testing</rdf:li>+ </rdf:Bag>+ </dc:subject>+ <dc:description>LeanCheck's logo. A check or tick is seen in green intersected with a lambda sign. Part of the lambda and the tick also form an X.++The proportions are based on the beautiful proportions of the Thompson-Wheeler Haskell logo (2009).</dc:description>+ <dc:source>https://github.com/rudymatela/leancheck</dc:source>+ <dc:publisher>+ <cc:Agent>+ <dc:title />+ </cc:Agent>+ </dc:publisher>+ </cc:Work>+ <cc:License+ rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">+ <cc:permits+ rdf:resource="http://creativecommons.org/ns#Reproduction" />+ <cc:permits+ rdf:resource="http://creativecommons.org/ns#Distribution" />+ <cc:requires+ rdf:resource="http://creativecommons.org/ns#Notice" />+ <cc:requires+ rdf:resource="http://creativecommons.org/ns#Attribution" />+ <cc:permits+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />+ <cc:requires+ rdf:resource="http://creativecommons.org/ns#ShareAlike" />+ </cc:License>+ </rdf:RDF>+ </metadata>+ <g+ inkscape:label="Layer 1"+ inkscape:groupmode="layer"+ id="layer1"+ transform="translate(297.11803,-172.26764)">+ <path+ style="clip-rule:nonzero;fill:#7fb399;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.17638952"+ d="m -237.11837,172.26764 -32.49995,48.74992 -12.49979,-18.74983 h -14.99992 l 19.99989,29.99983 h 14.99992 l 39.99976,-59.99992 z"+ id="path9-3"+ inkscape:connector-curvature="0" />+ <path+ inkscape:connector-curvature="0"+ id="path9"+ d="m -277.11824,232.26764 20.00013,-29.99985 -20.00013,-29.99984 h 14.99992 l 39.99957,59.99969 h -14.99992 l -12.49948,-18.74956 -12.50017,18.74956 z m 0,0"+ style="clip-rule:nonzero;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.17638862" />+ <path+ style="clip-rule:nonzero;fill:#4c8066;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.17638862"+ d="m -249.61858,191.01803 -27.49932,41.24961 h 14.99958 l 19.99979,-29.99967 z"+ id="path9-3-3"+ inkscape:connector-curvature="0"+ sodipodi:nodetypes="ccccc" />+ </g>+</svg>
doc/tutorial.md view
@@ -143,6 +143,11 @@ > check (prop_length :: [Int] -> Bool) +++ OK, passed 200 tests. +_A little challenge:_+After `sort`ing a list, the number of occurrences of any element does not+change. Can you define a `prop_count :: Eq a => a -> [a] -> Bool` property+that checks this? Hint: start by defining an auxiliary function+`count :: a -> [a] -> Int`. Example 2: testing conditional properties -----------------------------------------
eg/overflow.hs view
@@ -32,20 +32,10 @@ prop :: T -> Bool prop t = pre t ==> post t -instance Listable Int16 where- list = map unX list- instance Listable T where- tiers = cons5 T--{---- In case we start providing a default Listable instance for Int16 with a--- regular enuemration. We can use the following Listable T instance.-instance Listable T where tiers = cons5 makeT where makeT (Xs i) (Xs j) (Xs k) (Xs l) (Xs m) = T i j k l m--} main :: IO () main = do
leancheck.cabal view
@@ -11,7 +11,7 @@ -- this cabal file too complicated. -- Rudy name: leancheck-version: 0.8.0+version: 0.9.0 synopsis: Enumerative property-based testing description: LeanCheck is a simple enumerative property-based testing library.@@ -41,6 +41,7 @@ , changelog.md , doc/data-invariant.md , doc/tutorial.md+ , doc/leancheck.svg extra-source-files: .gitignore , .travis.yml , Makefile@@ -62,7 +63,8 @@ , test/diff/*.out , test/diff/eg/*.out , test/sdist-tested-with: GHC==8.4, GHC==8.2, GHC==8.0, GHC==7.10, GHC==7.8, GHC==7.6, GHC==7.4+tested-with: GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0+ , GHC==7.10, GHC==7.8, GHC==7.6, GHC==7.4 source-repository head@@ -72,7 +74,7 @@ source-repository this type: git location: https://github.com/rudymatela/leancheck- tag: v0.8.0+ tag: v0.9.0 library exposed-modules: Test.LeanCheck
src/Test/LeanCheck.hs view
@@ -1,7 +1,7 @@ {-# OPTIONS_HADDOCK prune #-} -- | -- Module : Test.LeanCheck--- Copyright : (c) 2015-2018 Rudy Matela+-- Copyright : (c) 2015-2019 Rudy Matela -- License : 3-Clause BSD (see the file LICENSE) -- Maintainer : Rudy Matela <rudy@matela.com.br> --
src/Test/LeanCheck/Basic.hs view
@@ -1,6 +1,7 @@+{-# LANGUAGE CPP #-} -- | -- Module : Test.LeanCheck.Basic--- Copyright : (c) 2015-2018 Rudy Matela+-- Copyright : (c) 2015-2019 Rudy Matela -- License : 3-Clause BSD (see the file LICENSE) -- Maintainer : Rudy Matela <rudy@matela.com.br> --@@ -11,10 +12,20 @@ -- -- * support for 'Listable' 6-tuples up to 12-tuples; -- * 'tiers' constructors (@consN@) with arities from 6 up to 12;--- * a 'Listable' 'Ratio' instance (consequently 'Listable' 'Rational'); -- * a 'Listable' 'Word' instance;+-- * a 'Listable' 'Ratio' instance (consequently 'Listable' 'Rational');+-- * a 'Listable' 'Complex' instance;+-- * 'Listable' 'Int8/16/32/64' instances;+-- * 'Listable' 'Word8/16/32/64' instances;+-- * 'Listable' instances for "Foreign.C" types;+-- * a 'Listable' 'ExitCode' instance;+-- * a 'Listable' 'GeneralCategory' instance;+-- * 'Listable' 'Buffer/IO/SeekMode' instances; -- * the operators 'addWeight' and 'ofWeight'. --+-- The above includes all types defined in the Haskell 2010 Report+-- with the exception of Array, IO, Handle, HandlePosn, IOErrorType.+-- -- "Test.LeanCheck" already exports everything from this module. -- You are probably better off importing it. --@@ -36,11 +47,15 @@ ) where --- TODO: Listable Int8/16/32/64, Word8/16/32/64, Natural- import Test.LeanCheck.Core-import Data.Word (Word) import Data.Ratio+import Data.Complex+import Data.Int (Int8, Int16, Int32, Int64)+import Data.Word (Word, Word8, Word16, Word32, Word64)+import Data.Char (GeneralCategory)+import System.IO (IOMode (..), BufferMode (..), SeekMode (..))+import Foreign.C+import System.Exit instance (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f) =>@@ -162,9 +177,99 @@ tiers = mapT (uncurry (%)) . reset $ tiers `suchThat` (\(n,d) -> d > 0 && n `gcd` d == 1) --- | > list :: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]+instance (RealFloat a, Listable a) => Listable (Complex a) where+ tiers = cons2 (:+)++-- | > list :: [Word] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...] instance Listable Word where list = listIntegral++-- | > list :: [Word8] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 255]+instance Listable Word8 where+ list = listIntegral++-- | > list :: [Word16] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 65535]+instance Listable Word16 where+ list = listIntegral++-- | > list :: [Word32] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]+instance Listable Word32 where+ list = listIntegral++-- | > list :: [Word64] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]+instance Listable Word64 where+ list = listIntegral++-- | > list :: [Int8] = [0, 1, -1, 2, -2, 3, -3, ..., 127, -127, -128]+instance Listable Int8 where+ list = listIntegral++-- | > list :: [Int16] = [0, 1, -1, 2, -2, ..., 32767, -32767, -32768]+instance Listable Int16 where+ list = listIntegral++-- | > list :: [Int32] = [0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, ...]+instance Listable Int32 where+ list = listIntegral++-- | > list :: [Int64] = [0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, ...]+instance Listable Int64 where+ list = listIntegral++instance Listable CChar where list = listIntegral+instance Listable CSChar where list = listIntegral+instance Listable CUChar where list = listIntegral+instance Listable CShort where list = listIntegral+instance Listable CUShort where list = listIntegral+instance Listable CInt where list = listIntegral+instance Listable CUInt where list = listIntegral+instance Listable CLong where list = listIntegral+instance Listable CULong where list = listIntegral+instance Listable CPtrdiff where list = listIntegral+instance Listable CSize where list = listIntegral+instance Listable CWchar where list = listIntegral+instance Listable CSigAtomic where list = listIntegral+instance Listable CLLong where list = listIntegral+instance Listable CULLong where list = listIntegral+instance Listable CIntPtr where list = listIntegral+instance Listable CUIntPtr where list = listIntegral+instance Listable CIntMax where list = listIntegral+instance Listable CUIntMax where list = listIntegral+instance Listable CClock where list = listIntegral+instance Listable CTime where list = listIntegral+instance Listable CFloat where tiers = tiersFloating+instance Listable CDouble where tiers = tiersFloating+#if __GLASGOW_HASKELL__ >= 802+instance Listable CBool where list = listIntegral+#endif+#if __GLASGOW_HASKELL__+instance Listable CUSeconds where list = listIntegral+instance Listable CSUSeconds where list = listIntegral+#endif++-- | Only includes valid POSIX exit codes+--+-- > > list :: [ExitCode]+-- > [ExitSuccess, ExitFailure 1, ExitFailure 2, ..., ExitFailure 255]+instance Listable ExitCode where list = ExitSuccess : map ExitFailure [1..255]++instance Listable GeneralCategory where list = [minBound..maxBound]++instance Listable IOMode where+ tiers = cons0 ReadMode+ \/ cons0 WriteMode+ \/ cons0 AppendMode+ \/ cons0 ReadWriteMode++instance Listable BufferMode where+ tiers = cons0 NoBuffering+ \/ cons0 LineBuffering+ \/ cons1 BlockBuffering++instance Listable SeekMode where+ tiers = cons0 AbsoluteSeek+ \/ cons0 RelativeSeek+ \/ cons0 SeekFromEnd -- | Resets the weight of a constructor or tiers. --
src/Test/LeanCheck/Error.hs view
@@ -56,16 +56,18 @@ import Control.Monad (liftM) import System.IO.Unsafe (unsafePerformIO) import Data.Maybe (listToMaybe, fromMaybe)-import Control.Exception ( Exception+import Control.Exception ( evaluate+ , catch+#if __GLASGOW_HASKELL__+ , Exception , SomeException , ArithException , ArrayException , ErrorCall , PatternMatchFail- , catch , catches , Handler (Handler)- , evaluate+#endif ) -- | Takes a value and a function. Ignores the value. Binds the argument of@@ -81,6 +83,7 @@ -- * PatternMatchFail errorToNothing :: a -> Maybe a errorToNothing x = unsafePerformIO $+#if __GLASGOW_HASKELL__ (Just `liftM` evaluate x) `catches` map ($ return Nothing) [ hf (undefined :: ArithException) , hf (undefined :: ArrayException)@@ -89,12 +92,19 @@ ] where hf :: Exception e => e -> IO a -> Handler a -- handlerFor hf e h = Handler $ bindArgumentType e (\_ -> h)+#else+ (Just `liftM` evaluate x) `catch` (\_ -> return Nothing)+#endif -- | Transforms a value into 'Just' that value or 'Nothing' on error. anyErrorToNothing :: a -> Maybe a anyErrorToNothing x = unsafePerformIO $+#if __GLASGOW_HASKELL__ (Just `liftM` evaluate x) `catch` \e -> do let _ = e :: SomeException return Nothing+#else+ (Just `liftM` evaluate x) `catch` (\_ -> return Nothing)+#endif errorToFalse :: Bool -> Bool errorToFalse = fromError False
src/Test/LeanCheck/Function.hs view
@@ -40,6 +40,14 @@ -- -- Warning: this is only intended to be used in testing modules. Avoid -- importing this on modules that are used as libraries.+--+-- The 'Listable' and 'Show' function instance are defined in, respectively:+--+-- * "Test.LeanCheck.Function.Listable";+-- * "Test.LeanCheck.Function.Show".+--+-- The 'Show' instance will work for all functions whose return types are+-- instances of ShowFunction from "Test.LeanCheck.Function.ShowFunction". module Test.LeanCheck.Function () where import Test.LeanCheck.Core (Listable) -- for Haddock import Test.LeanCheck.Function.Listable ()
src/Test/LeanCheck/Function/ShowFunction.hs view
@@ -30,6 +30,7 @@ -- and -- "Test.LeanCheck.Function.Show" -- exports an instance like the one above.+{-# LANGUAGE CPP #-} module Test.LeanCheck.Function.ShowFunction ( -- * Showing functions@@ -61,6 +62,14 @@ import Data.List (intercalate, sortBy) import Data.Maybe import Data.Function (on)+import Data.Word+import Data.Int+import Data.Ratio+import Data.Complex+import Data.Char (GeneralCategory)+import System.Exit (ExitCode)+import System.IO (IOMode, BufferMode, SeekMode)+import Foreign.C -- | A functional binding in a showable format. -- Argument values are represented as a list of strings.@@ -170,6 +179,7 @@ instance ShowFunction () where bindtiers = bindtiersShow instance ShowFunction Bool where bindtiers = bindtiersShow instance ShowFunction Int where bindtiers = bindtiersShow+instance ShowFunction Word where bindtiers = bindtiersShow instance ShowFunction Integer where bindtiers = bindtiersShow instance ShowFunction Char where bindtiers = bindtiersShow instance ShowFunction Float where bindtiers = bindtiersShow@@ -312,7 +322,39 @@ => ShowFunction (a,b,c,d,e,f,g) where bindtiers = bindtiersShow instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => ShowFunction (a,b,c,d,e,f,g,h) where bindtiers = bindtiersShow+instance ( Show a, Show b, Show c, Show d+ , Show e, Show f, Show g, Show h+ , Show i )+ => ShowFunction (a,b,c,d,e,f,g,h,i) where bindtiers = bindtiersShow+instance ( Show a, Show b, Show c, Show d+ , Show e, Show f, Show g, Show h+ , Show i, Show j )+ => ShowFunction (a,b,c,d,e,f,g,h,i,j) where bindtiers = bindtiersShow+instance ( Show a, Show b, Show c, Show d+ , Show e, Show f, Show g, Show h+ , Show i, Show j, Show k )+ => ShowFunction (a,b,c,d,e,f,g,h,i,j,k) where bindtiers = bindtiersShow+instance ( Show a, Show b, Show c, Show d+ , Show e, Show f, Show g, Show h+ , Show i, Show j, Show k, Show l )+ => ShowFunction (a,b,c,d,e,f,g,h,i,j,k,l) where bindtiers = bindtiersShow +-- Data.Ratio+instance (Integral a, Show a) => ShowFunction (Ratio a) where bindtiers = bindtiersShow++-- Data.Complex+instance (RealFloat a, Show a) => ShowFunction (Complex a) where bindtiers = bindtiersShow++-- instance for types from Data.Int and Data.Word+instance ShowFunction Int8 where bindtiers = bindtiersShow+instance ShowFunction Int16 where bindtiers = bindtiersShow+instance ShowFunction Int32 where bindtiers = bindtiersShow+instance ShowFunction Int64 where bindtiers = bindtiersShow+instance ShowFunction Word8 where bindtiers = bindtiersShow+instance ShowFunction Word16 where bindtiers = bindtiersShow+instance ShowFunction Word32 where bindtiers = bindtiersShow+instance ShowFunction Word64 where bindtiers = bindtiersShow+ -- instance for types from Test.LeanCheck.Utils.Types instance ShowFunction Nat where bindtiers = bindtiersShow instance ShowFunction Nat1 where bindtiers = bindtiersShow@@ -330,6 +372,70 @@ instance ShowFunction Word2 where bindtiers = bindtiersShow instance ShowFunction Word3 where bindtiers = bindtiersShow instance ShowFunction Word4 where bindtiers = bindtiersShow++instance ShowFunction Natural where bindtiers = bindtiersShow++instance ShowFunction Letter where bindtiers = bindtiersShow+instance ShowFunction AlphaNum where bindtiers = bindtiersShow+instance ShowFunction Digit where bindtiers = bindtiersShow+instance ShowFunction Alpha where bindtiers = bindtiersShow+instance ShowFunction Upper where bindtiers = bindtiersShow+instance ShowFunction Lower where bindtiers = bindtiersShow+instance ShowFunction Space where bindtiers = bindtiersShow++instance ShowFunction Spaces where bindtiers = bindtiersShow+instance ShowFunction Lowers where bindtiers = bindtiersShow+instance ShowFunction Uppers where bindtiers = bindtiersShow+instance ShowFunction Alphas where bindtiers = bindtiersShow+instance ShowFunction Digits where bindtiers = bindtiersShow+instance ShowFunction AlphaNums where bindtiers = bindtiersShow+instance ShowFunction Letters where bindtiers = bindtiersShow++instance Show a => ShowFunction (X a) where bindtiers = bindtiersShow+instance Show a => ShowFunction (Xs a) where bindtiers = bindtiersShow+instance Show a => ShowFunction (Set a) where bindtiers = bindtiersShow+instance Show a => ShowFunction (Bag a) where bindtiers = bindtiersShow+instance Show a => ShowFunction (NoDup a) where bindtiers = bindtiersShow+instance (Show a, Show b) => ShowFunction (Map a b) where bindtiers = bindtiersShow++-- misc instances+instance ShowFunction ExitCode where bindtiers = bindtiersShow+instance ShowFunction SeekMode where bindtiers = bindtiersShow+instance ShowFunction IOMode where bindtiers = bindtiersShow+instance ShowFunction BufferMode where bindtiers = bindtiersShow+instance ShowFunction GeneralCategory where bindtiers = bindtiersShow++-- instances for Foreign.C types+instance ShowFunction CChar where bindtiers = bindtiersShow+instance ShowFunction CSChar where bindtiers = bindtiersShow+instance ShowFunction CUChar where bindtiers = bindtiersShow+instance ShowFunction CShort where bindtiers = bindtiersShow+instance ShowFunction CUShort where bindtiers = bindtiersShow+instance ShowFunction CInt where bindtiers = bindtiersShow+instance ShowFunction CUInt where bindtiers = bindtiersShow+instance ShowFunction CLong where bindtiers = bindtiersShow+instance ShowFunction CULong where bindtiers = bindtiersShow+instance ShowFunction CPtrdiff where bindtiers = bindtiersShow+instance ShowFunction CSize where bindtiers = bindtiersShow+instance ShowFunction CWchar where bindtiers = bindtiersShow+instance ShowFunction CSigAtomic where bindtiers = bindtiersShow+instance ShowFunction CLLong where bindtiers = bindtiersShow+instance ShowFunction CULLong where bindtiers = bindtiersShow+instance ShowFunction CIntPtr where bindtiers = bindtiersShow+instance ShowFunction CUIntPtr where bindtiers = bindtiersShow+instance ShowFunction CIntMax where bindtiers = bindtiersShow+instance ShowFunction CUIntMax where bindtiers = bindtiersShow+instance ShowFunction CClock where bindtiers = bindtiersShow+instance ShowFunction CTime where bindtiers = bindtiersShow+instance ShowFunction CFloat where bindtiers = bindtiersShow+instance ShowFunction CDouble where bindtiers = bindtiersShow+#if __GLASGOW_HASKELL__ >= 802+instance ShowFunction CBool where bindtiers = bindtiersShow+#endif+#if __GLASGOW_HASKELL__+instance ShowFunction CUSeconds where bindtiers = bindtiersShow+instance ShowFunction CSUSeconds where bindtiers = bindtiersShow+#endif -- | Hard coded function names and bindings -- Search this list for a short name for your function.
+ test/diff/tiers-ComplexDouble.out view
@@ -0,0 +1,279 @@+map length (tiers :: [[ Complex Double ]]) = [0,1,2,5,10,14,20,25,32,40,48,60,...]++length (list :: [ Complex Double ]) = Infinity++allUnique (list :: [ Complex Double ]) = True++ratioRepetitions (list :: [ Complex Double ]) = 0 % 1++tiers :: [Complex Double] =+ [ []+ , [0.0 :+ 0.0]+ , [ 0.0 :+ 1.0+ , 1.0 :+ 0.0+ ]+ , [ 0.0 :+ (-1.0)+ , 0.0 :+ Infinity+ , 1.0 :+ 1.0+ , (-1.0) :+ 0.0+ , Infinity :+ 0.0+ ]+ , [ 0.0 :+ 0.5+ , 0.0 :+ 2.0+ , 0.0 :+ (-Infinity)+ , 1.0 :+ (-1.0)+ , 1.0 :+ Infinity+ , (-1.0) :+ 1.0+ , Infinity :+ 1.0+ , 0.5 :+ 0.0+ , 2.0 :+ 0.0+ , (-Infinity) :+ 0.0+ ]+ , [ 0.0 :+ (-0.5)+ , 0.0 :+ (-2.0)+ , 1.0 :+ 0.5+ , 1.0 :+ 2.0+ , 1.0 :+ (-Infinity)+ , (-1.0) :+ (-1.0)+ , (-1.0) :+ Infinity+ , Infinity :+ (-1.0)+ , Infinity :+ Infinity+ , 0.5 :+ 1.0+ , 2.0 :+ 1.0+ , (-Infinity) :+ 1.0+ , (-0.5) :+ 0.0+ , (-2.0) :+ 0.0+ ]+ , [ 0.0 :+ 0.3333333333333333+ , 0.0 :+ 3.0+ , 1.0 :+ (-0.5)+ , 1.0 :+ (-2.0)+ , (-1.0) :+ 0.5+ , (-1.0) :+ 2.0+ , (-1.0) :+ (-Infinity)+ , Infinity :+ 0.5+ , Infinity :+ 2.0+ , Infinity :+ (-Infinity)+ , 0.5 :+ (-1.0)+ , 0.5 :+ Infinity+ , 2.0 :+ (-1.0)+ , 2.0 :+ Infinity+ , (-Infinity) :+ (-1.0)+ , (-Infinity) :+ Infinity+ , (-0.5) :+ 1.0+ , (-2.0) :+ 1.0+ , 0.3333333333333333 :+ 0.0+ , 3.0 :+ 0.0+ ]+ , [ 0.0 :+ (-0.3333333333333333)+ , 0.0 :+ (-3.0)+ , 1.0 :+ 0.3333333333333333+ , 1.0 :+ 3.0+ , (-1.0) :+ (-0.5)+ , (-1.0) :+ (-2.0)+ , Infinity :+ (-0.5)+ , Infinity :+ (-2.0)+ , 0.5 :+ 0.5+ , 0.5 :+ 2.0+ , 0.5 :+ (-Infinity)+ , 2.0 :+ 0.5+ , 2.0 :+ 2.0+ , 2.0 :+ (-Infinity)+ , (-Infinity) :+ 0.5+ , (-Infinity) :+ 2.0+ , (-Infinity) :+ (-Infinity)+ , (-0.5) :+ (-1.0)+ , (-0.5) :+ Infinity+ , (-2.0) :+ (-1.0)+ , (-2.0) :+ Infinity+ , 0.3333333333333333 :+ 1.0+ , 3.0 :+ 1.0+ , (-0.3333333333333333) :+ 0.0+ , (-3.0) :+ 0.0+ ]+ , [ 0.0 :+ 0.25+ , 0.0 :+ 0.6666666666666666+ , 0.0 :+ 1.5+ , 0.0 :+ 4.0+ , 1.0 :+ (-0.3333333333333333)+ , 1.0 :+ (-3.0)+ , (-1.0) :+ 0.3333333333333333+ , (-1.0) :+ 3.0+ , Infinity :+ 0.3333333333333333+ , Infinity :+ 3.0+ , 0.5 :+ (-0.5)+ , 0.5 :+ (-2.0)+ , 2.0 :+ (-0.5)+ , 2.0 :+ (-2.0)+ , (-Infinity) :+ (-0.5)+ , (-Infinity) :+ (-2.0)+ , (-0.5) :+ 0.5+ , (-0.5) :+ 2.0+ , (-0.5) :+ (-Infinity)+ , (-2.0) :+ 0.5+ , (-2.0) :+ 2.0+ , (-2.0) :+ (-Infinity)+ , 0.3333333333333333 :+ (-1.0)+ , 0.3333333333333333 :+ Infinity+ , 3.0 :+ (-1.0)+ , 3.0 :+ Infinity+ , (-0.3333333333333333) :+ 1.0+ , (-3.0) :+ 1.0+ , 0.25 :+ 0.0+ , 0.6666666666666666 :+ 0.0+ , 1.5 :+ 0.0+ , 4.0 :+ 0.0+ ]+ , [ 0.0 :+ (-0.25)+ , 0.0 :+ (-0.6666666666666666)+ , 0.0 :+ (-1.5)+ , 0.0 :+ (-4.0)+ , 1.0 :+ 0.25+ , 1.0 :+ 0.6666666666666666+ , 1.0 :+ 1.5+ , 1.0 :+ 4.0+ , (-1.0) :+ (-0.3333333333333333)+ , (-1.0) :+ (-3.0)+ , Infinity :+ (-0.3333333333333333)+ , Infinity :+ (-3.0)+ , 0.5 :+ 0.3333333333333333+ , 0.5 :+ 3.0+ , 2.0 :+ 0.3333333333333333+ , 2.0 :+ 3.0+ , (-Infinity) :+ 0.3333333333333333+ , (-Infinity) :+ 3.0+ , (-0.5) :+ (-0.5)+ , (-0.5) :+ (-2.0)+ , (-2.0) :+ (-0.5)+ , (-2.0) :+ (-2.0)+ , 0.3333333333333333 :+ 0.5+ , 0.3333333333333333 :+ 2.0+ , 0.3333333333333333 :+ (-Infinity)+ , 3.0 :+ 0.5+ , 3.0 :+ 2.0+ , 3.0 :+ (-Infinity)+ , (-0.3333333333333333) :+ (-1.0)+ , (-0.3333333333333333) :+ Infinity+ , (-3.0) :+ (-1.0)+ , (-3.0) :+ Infinity+ , 0.25 :+ 1.0+ , 0.6666666666666666 :+ 1.0+ , 1.5 :+ 1.0+ , 4.0 :+ 1.0+ , (-0.25) :+ 0.0+ , (-0.6666666666666666) :+ 0.0+ , (-1.5) :+ 0.0+ , (-4.0) :+ 0.0+ ]+ , [ 0.0 :+ 0.2+ , 0.0 :+ 5.0+ , 1.0 :+ (-0.25)+ , 1.0 :+ (-0.6666666666666666)+ , 1.0 :+ (-1.5)+ , 1.0 :+ (-4.0)+ , (-1.0) :+ 0.25+ , (-1.0) :+ 0.6666666666666666+ , (-1.0) :+ 1.5+ , (-1.0) :+ 4.0+ , Infinity :+ 0.25+ , Infinity :+ 0.6666666666666666+ , Infinity :+ 1.5+ , Infinity :+ 4.0+ , 0.5 :+ (-0.3333333333333333)+ , 0.5 :+ (-3.0)+ , 2.0 :+ (-0.3333333333333333)+ , 2.0 :+ (-3.0)+ , (-Infinity) :+ (-0.3333333333333333)+ , (-Infinity) :+ (-3.0)+ , (-0.5) :+ 0.3333333333333333+ , (-0.5) :+ 3.0+ , (-2.0) :+ 0.3333333333333333+ , (-2.0) :+ 3.0+ , 0.3333333333333333 :+ (-0.5)+ , 0.3333333333333333 :+ (-2.0)+ , 3.0 :+ (-0.5)+ , 3.0 :+ (-2.0)+ , (-0.3333333333333333) :+ 0.5+ , (-0.3333333333333333) :+ 2.0+ , (-0.3333333333333333) :+ (-Infinity)+ , (-3.0) :+ 0.5+ , (-3.0) :+ 2.0+ , (-3.0) :+ (-Infinity)+ , 0.25 :+ (-1.0)+ , 0.25 :+ Infinity+ , 0.6666666666666666 :+ (-1.0)+ , 0.6666666666666666 :+ Infinity+ , 1.5 :+ (-1.0)+ , 1.5 :+ Infinity+ , 4.0 :+ (-1.0)+ , 4.0 :+ Infinity+ , (-0.25) :+ 1.0+ , (-0.6666666666666666) :+ 1.0+ , (-1.5) :+ 1.0+ , (-4.0) :+ 1.0+ , 0.2 :+ 0.0+ , 5.0 :+ 0.0+ ]+ , [ 0.0 :+ (-0.2)+ , 0.0 :+ (-5.0)+ , 1.0 :+ 0.2+ , 1.0 :+ 5.0+ , (-1.0) :+ (-0.25)+ , (-1.0) :+ (-0.6666666666666666)+ , (-1.0) :+ (-1.5)+ , (-1.0) :+ (-4.0)+ , Infinity :+ (-0.25)+ , Infinity :+ (-0.6666666666666666)+ , Infinity :+ (-1.5)+ , Infinity :+ (-4.0)+ , 0.5 :+ 0.25+ , 0.5 :+ 0.6666666666666666+ , 0.5 :+ 1.5+ , 0.5 :+ 4.0+ , 2.0 :+ 0.25+ , 2.0 :+ 0.6666666666666666+ , 2.0 :+ 1.5+ , 2.0 :+ 4.0+ , (-Infinity) :+ 0.25+ , (-Infinity) :+ 0.6666666666666666+ , (-Infinity) :+ 1.5+ , (-Infinity) :+ 4.0+ , (-0.5) :+ (-0.3333333333333333)+ , (-0.5) :+ (-3.0)+ , (-2.0) :+ (-0.3333333333333333)+ , (-2.0) :+ (-3.0)+ , 0.3333333333333333 :+ 0.3333333333333333+ , 0.3333333333333333 :+ 3.0+ , 3.0 :+ 0.3333333333333333+ , 3.0 :+ 3.0+ , (-0.3333333333333333) :+ (-0.5)+ , (-0.3333333333333333) :+ (-2.0)+ , (-3.0) :+ (-0.5)+ , (-3.0) :+ (-2.0)+ , 0.25 :+ 0.5+ , 0.25 :+ 2.0+ , 0.25 :+ (-Infinity)+ , 0.6666666666666666 :+ 0.5+ , 0.6666666666666666 :+ 2.0+ , 0.6666666666666666 :+ (-Infinity)+ , 1.5 :+ 0.5+ , 1.5 :+ 2.0+ , 1.5 :+ (-Infinity)+ , 4.0 :+ 0.5+ , 4.0 :+ 2.0+ , 4.0 :+ (-Infinity)+ , (-0.25) :+ (-1.0)+ , (-0.25) :+ Infinity+ , (-0.6666666666666666) :+ (-1.0)+ , (-0.6666666666666666) :+ Infinity+ , (-1.5) :+ (-1.0)+ , (-1.5) :+ Infinity+ , (-4.0) :+ (-1.0)+ , (-4.0) :+ Infinity+ , 0.2 :+ 1.0+ , 5.0 :+ 1.0+ , (-0.2) :+ 0.0+ , (-5.0) :+ 0.0+ ]+ , ...+ ]
+ test/diff/tiers-Int2.out view
@@ -0,0 +1,14 @@+map length (tiers :: [[ Int2 ]]) = [1,1,1,1]++length (list :: [ Int2 ]) = 4++allUnique (list :: [ Int2 ]) = True++ratioRepetitions (list :: [ Int2 ]) = 0 % 1++tiers :: [Int2] =+ [ [0]+ , [1]+ , [-1]+ , [-2]+ ]
+ test/diff/tiers-Int3.out view
@@ -0,0 +1,18 @@+map length (tiers :: [[ Int3 ]]) = [1,1,1,1,1,1,1,1]++length (list :: [ Int3 ]) = 8++allUnique (list :: [ Int3 ]) = True++ratioRepetitions (list :: [ Int3 ]) = 0 % 1++tiers :: [Int3] =+ [ [0]+ , [1]+ , [-1]+ , [2]+ , [-2]+ , [3]+ , [-3]+ , [-4]+ ]
+ test/diff/tiers-Int4.out view
@@ -0,0 +1,26 @@+map length (tiers :: [[ Int4 ]]) = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]++length (list :: [ Int4 ]) = Infinity++allUnique (list :: [ Int4 ]) = True++ratioRepetitions (list :: [ Int4 ]) = 0 % 1++tiers :: [Int4] =+ [ [0]+ , [1]+ , [-1]+ , [2]+ , [-2]+ , [3]+ , [-3]+ , [4]+ , [-4]+ , [5]+ , [-5]+ , [6]+ , [-6]+ , [7]+ , [-7]+ , [-8]+ ]
+ test/diff/tiers-Int8.out view
@@ -0,0 +1,266 @@+map length (tiers :: [[ Int8 ]]) = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]++length (list :: [ Int8 ]) = Infinity++allUnique (list :: [ Int8 ]) = True++ratioRepetitions (list :: [ Int8 ]) = 0 % 1++tiers :: [Int8] =+ [ [0]+ , [1]+ , [-1]+ , [2]+ , [-2]+ , [3]+ , [-3]+ , [4]+ , [-4]+ , [5]+ , [-5]+ , [6]+ , [-6]+ , [7]+ , [-7]+ , [8]+ , [-8]+ , [9]+ , [-9]+ , [10]+ , [-10]+ , [11]+ , [-11]+ , [12]+ , [-12]+ , [13]+ , [-13]+ , [14]+ , [-14]+ , [15]+ , [-15]+ , [16]+ , [-16]+ , [17]+ , [-17]+ , [18]+ , [-18]+ , [19]+ , [-19]+ , [20]+ , [-20]+ , [21]+ , [-21]+ , [22]+ , [-22]+ , [23]+ , [-23]+ , [24]+ , [-24]+ , [25]+ , [-25]+ , [26]+ , [-26]+ , [27]+ , [-27]+ , [28]+ , [-28]+ , [29]+ , [-29]+ , [30]+ , [-30]+ , [31]+ , [-31]+ , [32]+ , [-32]+ , [33]+ , [-33]+ , [34]+ , [-34]+ , [35]+ , [-35]+ , [36]+ , [-36]+ , [37]+ , [-37]+ , [38]+ , [-38]+ , [39]+ , [-39]+ , [40]+ , [-40]+ , [41]+ , [-41]+ , [42]+ , [-42]+ , [43]+ , [-43]+ , [44]+ , [-44]+ , [45]+ , [-45]+ , [46]+ , [-46]+ , [47]+ , [-47]+ , [48]+ , [-48]+ , [49]+ , [-49]+ , [50]+ , [-50]+ , [51]+ , [-51]+ , [52]+ , [-52]+ , [53]+ , [-53]+ , [54]+ , [-54]+ , [55]+ , [-55]+ , [56]+ , [-56]+ , [57]+ , [-57]+ , [58]+ , [-58]+ , [59]+ , [-59]+ , [60]+ , [-60]+ , [61]+ , [-61]+ , [62]+ , [-62]+ , [63]+ , [-63]+ , [64]+ , [-64]+ , [65]+ , [-65]+ , [66]+ , [-66]+ , [67]+ , [-67]+ , [68]+ , [-68]+ , [69]+ , [-69]+ , [70]+ , [-70]+ , [71]+ , [-71]+ , [72]+ , [-72]+ , [73]+ , [-73]+ , [74]+ , [-74]+ , [75]+ , [-75]+ , [76]+ , [-76]+ , [77]+ , [-77]+ , [78]+ , [-78]+ , [79]+ , [-79]+ , [80]+ , [-80]+ , [81]+ , [-81]+ , [82]+ , [-82]+ , [83]+ , [-83]+ , [84]+ , [-84]+ , [85]+ , [-85]+ , [86]+ , [-86]+ , [87]+ , [-87]+ , [88]+ , [-88]+ , [89]+ , [-89]+ , [90]+ , [-90]+ , [91]+ , [-91]+ , [92]+ , [-92]+ , [93]+ , [-93]+ , [94]+ , [-94]+ , [95]+ , [-95]+ , [96]+ , [-96]+ , [97]+ , [-97]+ , [98]+ , [-98]+ , [99]+ , [-99]+ , [100]+ , [-100]+ , [101]+ , [-101]+ , [102]+ , [-102]+ , [103]+ , [-103]+ , [104]+ , [-104]+ , [105]+ , [-105]+ , [106]+ , [-106]+ , [107]+ , [-107]+ , [108]+ , [-108]+ , [109]+ , [-109]+ , [110]+ , [-110]+ , [111]+ , [-111]+ , [112]+ , [-112]+ , [113]+ , [-113]+ , [114]+ , [-114]+ , [115]+ , [-115]+ , [116]+ , [-116]+ , [117]+ , [-117]+ , [118]+ , [-118]+ , [119]+ , [-119]+ , [120]+ , [-120]+ , [121]+ , [-121]+ , [122]+ , [-122]+ , [123]+ , [-123]+ , [124]+ , [-124]+ , [125]+ , [-125]+ , [126]+ , [-126]+ , [127]+ , [-127]+ , [-128]+ ]
+ test/diff/tiers-Nat2.out view
@@ -0,0 +1,12 @@+map length (tiers :: [[ Nat2 ]]) = [1,1]++length (list :: [ Nat2 ]) = 2++allUnique (list :: [ Nat2 ]) = True++ratioRepetitions (list :: [ Nat2 ]) = 0 % 1++tiers :: [Nat2] =+ [ [0]+ , [1]+ ]
+ test/diff/tiers-Nat3.out view
@@ -0,0 +1,13 @@+map length (tiers :: [[ Nat3 ]]) = [1,1,1]++length (list :: [ Nat3 ]) = 3++allUnique (list :: [ Nat3 ]) = True++ratioRepetitions (list :: [ Nat3 ]) = 0 % 1++tiers :: [Nat3] =+ [ [0]+ , [1]+ , [2]+ ]
+ test/diff/tiers-Nat4.out view
@@ -0,0 +1,14 @@+map length (tiers :: [[ Nat4 ]]) = [1,1,1,1]++length (list :: [ Nat4 ]) = 4++allUnique (list :: [ Nat4 ]) = True++ratioRepetitions (list :: [ Nat4 ]) = 0 % 1++tiers :: [Nat4] =+ [ [0]+ , [1]+ , [2]+ , [3]+ ]
+ test/diff/tiers-Word2.out view
@@ -0,0 +1,14 @@+map length (tiers :: [[ Word2 ]]) = [1,1,1,1]++length (list :: [ Word2 ]) = 4++allUnique (list :: [ Word2 ]) = True++ratioRepetitions (list :: [ Word2 ]) = 0 % 1++tiers :: [Word2] =+ [ [0]+ , [1]+ , [2]+ , [3]+ ]
+ test/diff/tiers-Word3.out view
@@ -0,0 +1,18 @@+map length (tiers :: [[ Word3 ]]) = [1,1,1,1,1,1,1,1]++length (list :: [ Word3 ]) = 8++allUnique (list :: [ Word3 ]) = True++ratioRepetitions (list :: [ Word3 ]) = 0 % 1++tiers :: [Word3] =+ [ [0]+ , [1]+ , [2]+ , [3]+ , [4]+ , [5]+ , [6]+ , [7]+ ]
+ test/diff/tiers-Word4.out view
@@ -0,0 +1,26 @@+map length (tiers :: [[ Word4 ]]) = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]++length (list :: [ Word4 ]) = Infinity++allUnique (list :: [ Word4 ]) = True++ratioRepetitions (list :: [ Word4 ]) = 0 % 1++tiers :: [Word4] =+ [ [0]+ , [1]+ , [2]+ , [3]+ , [4]+ , [5]+ , [6]+ , [7]+ , [8]+ , [9]+ , [10]+ , [11]+ , [12]+ , [13]+ , [14]+ , [15]+ ]
+ test/diff/tiers-Word8.out view
@@ -0,0 +1,266 @@+map length (tiers :: [[ Word8 ]]) = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]++length (list :: [ Word8 ]) = Infinity++allUnique (list :: [ Word8 ]) = True++ratioRepetitions (list :: [ Word8 ]) = 0 % 1++tiers :: [Word8] =+ [ [0]+ , [1]+ , [2]+ , [3]+ , [4]+ , [5]+ , [6]+ , [7]+ , [8]+ , [9]+ , [10]+ , [11]+ , [12]+ , [13]+ , [14]+ , [15]+ , [16]+ , [17]+ , [18]+ , [19]+ , [20]+ , [21]+ , [22]+ , [23]+ , [24]+ , [25]+ , [26]+ , [27]+ , [28]+ , [29]+ , [30]+ , [31]+ , [32]+ , [33]+ , [34]+ , [35]+ , [36]+ , [37]+ , [38]+ , [39]+ , [40]+ , [41]+ , [42]+ , [43]+ , [44]+ , [45]+ , [46]+ , [47]+ , [48]+ , [49]+ , [50]+ , [51]+ , [52]+ , [53]+ , [54]+ , [55]+ , [56]+ , [57]+ , [58]+ , [59]+ , [60]+ , [61]+ , [62]+ , [63]+ , [64]+ , [65]+ , [66]+ , [67]+ , [68]+ , [69]+ , [70]+ , [71]+ , [72]+ , [73]+ , [74]+ , [75]+ , [76]+ , [77]+ , [78]+ , [79]+ , [80]+ , [81]+ , [82]+ , [83]+ , [84]+ , [85]+ , [86]+ , [87]+ , [88]+ , [89]+ , [90]+ , [91]+ , [92]+ , [93]+ , [94]+ , [95]+ , [96]+ , [97]+ , [98]+ , [99]+ , [100]+ , [101]+ , [102]+ , [103]+ , [104]+ , [105]+ , [106]+ , [107]+ , [108]+ , [109]+ , [110]+ , [111]+ , [112]+ , [113]+ , [114]+ , [115]+ , [116]+ , [117]+ , [118]+ , [119]+ , [120]+ , [121]+ , [122]+ , [123]+ , [124]+ , [125]+ , [126]+ , [127]+ , [128]+ , [129]+ , [130]+ , [131]+ , [132]+ , [133]+ , [134]+ , [135]+ , [136]+ , [137]+ , [138]+ , [139]+ , [140]+ , [141]+ , [142]+ , [143]+ , [144]+ , [145]+ , [146]+ , [147]+ , [148]+ , [149]+ , [150]+ , [151]+ , [152]+ , [153]+ , [154]+ , [155]+ , [156]+ , [157]+ , [158]+ , [159]+ , [160]+ , [161]+ , [162]+ , [163]+ , [164]+ , [165]+ , [166]+ , [167]+ , [168]+ , [169]+ , [170]+ , [171]+ , [172]+ , [173]+ , [174]+ , [175]+ , [176]+ , [177]+ , [178]+ , [179]+ , [180]+ , [181]+ , [182]+ , [183]+ , [184]+ , [185]+ , [186]+ , [187]+ , [188]+ , [189]+ , [190]+ , [191]+ , [192]+ , [193]+ , [194]+ , [195]+ , [196]+ , [197]+ , [198]+ , [199]+ , [200]+ , [201]+ , [202]+ , [203]+ , [204]+ , [205]+ , [206]+ , [207]+ , [208]+ , [209]+ , [210]+ , [211]+ , [212]+ , [213]+ , [214]+ , [215]+ , [216]+ , [217]+ , [218]+ , [219]+ , [220]+ , [221]+ , [222]+ , [223]+ , [224]+ , [225]+ , [226]+ , [227]+ , [228]+ , [229]+ , [230]+ , [231]+ , [232]+ , [233]+ , [234]+ , [235]+ , [236]+ , [237]+ , [238]+ , [239]+ , [240]+ , [241]+ , [242]+ , [243]+ , [244]+ , [245]+ , [246]+ , [247]+ , [248]+ , [249]+ , [250]+ , [251]+ , [252]+ , [253]+ , [254]+ , [255]+ ]
test/error.hs view
@@ -35,7 +35,7 @@ , exists n someOthers , witness n someOthers == Just ["2","2"]- , witnesses (100*n) someOthers == (map.map) show [[2,2],[2,4],[3,3]+ , witnesses (20*n) someOthers == (map.map) show [[2,2],[2,4],[3,3] ,[2,8],[3,9],[3,27]] ]
test/main.hs view
@@ -9,7 +9,9 @@ import Test.LeanCheck.Utils import Data.Ratio-import Data.Word (Word)+import Data.Complex+import Data.Int (Int, Int8, Int16, Int32, Int64)+import Data.Word (Word, Word8, Word16, Word32, Word64) main :: IO () main =@@ -77,6 +79,20 @@ , holds 100 $ (\/) ==== zipWith' (++) [] [] -:> [[bool]] , holds 100 $ (\\//) ==== zipWith' (+|) [] [] -:> [[uint2]] , holds 100 $ (\\//) ==== zipWith' (+|) [] [] -:> [[bool]]++ , holds 100 $ \x -> x == (x :: Word)+ , holds 100 $ \x -> x == (x :: Word8)+ , holds 100 $ \x -> x == (x :: Word16)+ , holds 100 $ \x -> x == (x :: Word32)+ , holds 100 $ \x -> x == (x :: Word64)++ , holds 100 $ \x -> x == (x :: Int)+ , holds 100 $ \x -> x == (x :: Int8)+ , holds 100 $ \x -> x == (x :: Int16)+ , holds 100 $ \x -> x == (x :: Int32)+ , holds 100 $ \x -> x == (x :: Int64)++ , holds 100 $ \x -> x == (x :: Complex Double) ] allUnique :: Ord a => [a] -> Bool