[Haskell-beginners] Typeclasses vs. Data
David Place
d at vidplace.com
Thu Jul 21 00:18:42 CEST 2011
On Jul 20, 2011, at 5:58 PM, Thomas wrote:
> class Continuation a where
> resume :: a -> Expression -> Expression
>
> data BeginCont a = BeginCont a Expression deriving (Show)
> instance (Continuation a) => Continuation (BeginCont a) where
> resume (BeginCont k es) v = eval_begin es k
I think we need to know the definition of Expression. if define it with a dummy type
eval_begin a b = a
type Expression = Int
this code fragment compiles. Would you send a code fragment that will yield the error?
____________________
David Place
Owner, Panpipes Ho! LLC
http://panpipesho.com
d at vidplace.com
More information about the Beginners
mailing list