I am trying to write tests for arbitrary Repa Arrays in Haskell. For some reason, the following snippet:
import Test.QuickCheck
import Test.QuickCheck.Monadic
import Data.Array.Repa (Array, DIM2)
prop_id :: Array U DIM2 Double -> Property
prop_id array = monadicIO $ array `R.equalsP` array >>= assert
throws this exception:
*** Failed! (after 1 test):
Exception:
Test.QuickCheck.resize: negative size
CallStack (from HasCallStack):
error, called at ./Test/QuickCheck/Gen.hs:82:22 in QuickCheck-2.9.2-Jyj4gc4JxkEIgGFLAsGhs9:Test.QuickCheck.Gen
Exception thrown while printing test case:
Test.QuickCheck.resize: negative size
CallStack (from HasCallStack):
error, called at ./Test/QuickCheck/Gen.hs:82:22 in QuickCheck-2.9.2-Jyj4gc4JxkEIgGFLAsGhs9:Test.QuickCheck.Gen
I'm not sure how to interpret this information. Thanks for your help.