@@ -24,11 +24,13 @@ import Control.Monad.Eff (Eff)
2424import Control.Monad.Eff.Console (CONSOLE , log )
2525import Control.Monad.Eff.Exception (EXCEPTION , throwException , error )
2626import Control.Monad.Eff.Random (RANDOM )
27+ import Control.Monad.Free (Free )
2728import Control.Monad.Trampoline (runTrampoline )
2829
2930import Data.Array as A
3031import Data.Foldable (class Foldable )
3132import Data.Int as Int
33+ import Data.Lazy (Lazy )
3234import Data.List (List (..), length )
3335import Data.List as List
3436import Data.Maybe (maybe )
@@ -37,9 +39,9 @@ import Data.Tuple (Tuple(..))
3739
3840import Math as Math
3941
40- import Test.StrongCheck.Gen (Gen , GenState (..), collectAll , sample' , decorateSeed )
41- import Test.StrongCheck.LCG (Seed , randomSeed , runSeed )
4242import Test.StrongCheck.Arbitrary (class Arbitrary , arbitrary )
43+ import Test.StrongCheck.Gen (GenT , Gen , GenState (..), collectAll , sample' , decorateSeed )
44+ import Test.StrongCheck.LCG (Seed , randomSeed , runSeed )
4345
4446import Test.StrongCheck.Arbitrary (class Arbitrary , arbitrary , class Coarbitrary , coarbitrary ) as Exports
4547import Test.StrongCheck.LCG (Seed , mkSeed ) as Exports
@@ -80,6 +82,9 @@ instance testableResult :: Testable Result where
8082instance testableFunction :: (Arbitrary t , Testable prop ) => Testable (t -> prop ) where
8183 test f = test <<< f =<< arbitrary
8284
85+ instance testableGen :: Testable prop => Testable (GenT (Free Lazy ) prop ) where
86+ test = flip bind test
87+
8388-- | Checks the proposition for 100 random values.
8489quickCheck :: forall eff prop . Testable prop => prop -> SC eff Unit
8590quickCheck prop = quickCheck' 100 prop
0 commit comments