On Apr 23, 2009, at 11:28 , michael rice wrote:
<interactive>:1:0:
No instance for (Show (Seed -> (Int, Seed)))
arising from a use of `print' at <interactive>:1:0-9
Possible fix:
add an instance declaration for (Show (Seed -> (Int, Seed)))
In a stmt of a 'do' expression: print it
Pretty much any time you get this kind of message, you've forgotten to include one or more arguments (how many is indicated by the number of "->"s) so ghci is trying to print a function.
In this case, while the definition of sumTwoDice *looks* like it doesn't take any arguments, if you look at the definition of the Random type, it is a function (in fact, the very type ghci is trying to print). You need to give it a seed before it will produce a result.
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [email protected] system administrator [openafs,heimdal,too many hats] [email protected] electrical and computer engineering, carnegie mellon university KF8NH
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
