Type classes and code generation

Keith Wansbrough Keith.Wansbrough@cl.cam.ac.uk
Tue, 17 Jun 2003 16:06:59 +0100

> You need to change the first line to this:
> > data C a = C { pair :: forall b. b -> (b,a) }
> and then it works fine (with -fglasgow-exts).  But you've now stepped
> outside the bounds of Haskell 98.

(oops, replying to myself... sure sign of madness! :) )

I hasten to add that this is *not* the same as existential quantification; note carefully the location of the forall wrt the constructor.

--KW 8-)
Keith Wansbrough <kw217@cl.cam.ac.uk>
University of Cambridge Computer Laboratory.