Re: Type classes and code generation
17 Jun
2003
17 Jun
'03
3:06 p.m.
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> http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory.
8485
Age (days ago)
8485
Last active (days ago)
0 comments
1 participants
participants (1)
-
Keith Wansbrough