[Haskell-cafe] Help using QuickCheck

Udo Stenzel u.stenzel at web.de
Fri Oct 21 14:14:18 EDT 2005

Benjamin Franksen wrote:
> I am asking help with using QuickCheck. I tried everything I could think 
> of, but invariably as soon as I start invoking the quickCheck function 
> on my property it fails with
>     No instances for (Arbitrary (OrdSeq Int), Show (OrdSeq Int))

You need to define an `instance Arbitrary (OrdSeq Int)' for QuickCheck
to be able to generate test data.  `instance Show (OrdSeq Int)' is
needed so the offending example can be reported to you in case some test
fails.  You should believe your compiler when it tells you

>       add an instance declaration for (Arbitrary (OrdSeq Int), Show 
> (OrdSeq Int))


> "No instance for (Show (IO ()))..."

I think, this is an artefact of unresolved overloading or missing
instances.  Somehow GHCi attaches an unnecessary implicit `print'.  When
I played with QuickCheck, this error went away as soon as the rest of
the expression type checked.

Life is Hard, But Life is Harder When You're Dumb.
	-- The Austin Lounge Lizards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20051021/12a1ef50/attachment.bin

More information about the Haskell-Cafe mailing list