
17 Jun
2003
17 Jun
'03
11:06 a.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