[Haskell-cafe] Missing a "Deriving"?

Ketil Malde ketil at malde.org
Sat May 30 17:37:57 EDT 2009


michael rice <nowgate at yahoo.com> writes:

> The following code is from Section 8.4.2, pgs. 111-112 (PDF paging) of YAHT.
> It compiles fine, but upon trying it I get the following error message.
> It seems to be trying to 'Show' the Computation class but I'm not sure where to put the 'Deriving'.

My guess is that your expression is polymorphic, returning 
   Computation c => c [Int]

Since Haskell knows how to show this for both of the instances defined
for Computation (i.e. Maybe [Int] and [[Int]]), perhaps you could give
one of those as an explicit type signature?

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list