prop_anyBlockBlah :: Int -> Bool
prop_anyBlockBlah r
| r < 0 = True
| r == 9 = True
| otherwise = not (isOkayBlock [Nothing | _ <- [0 .. r]])
here the type of the list isn't actually constrained by the property at all! It's constrained by isOkayBlock... but the type of that might vary as we fix! So we introduce -XPartialTypeSignatures and give our wrapped properties a type:
prop'_anyBlockBlah :: _ -> Int -> Bool
prop'_anyBlockBlah isOkayBlock r
| r < 0 = True
| r == 9 = True
| otherwise = not (isOkayBlock [Nothing | _ <- [0 .. r]])
which, in conjucnction with the property being applied to expr__isOkayBlock is enough to determine the type!
Sometimes the type annotations are not enough:
here the type of the list isn't actually constrained by the property at all! It's constrained by
isOkayBlock
... but the type of that might vary as we fix! So we introduce-XPartialTypeSignatures
and give our wrapped properties a type:which, in conjucnction with the property being applied to
expr__isOkayBlock
is enough to determine the type!