forall for all places
Ralf Hinze
ralf at informatik.uni-bonn.de
Fri Oct 19 07:06:03 EDT 2001
GHC 5.02 accepts forall types only at some sensible places:
this works
data CPS a = CPS { unCPS :: forall ans . (a -> ans) -> ans }
this doesn't work
newtype CPS a = CPS { unCPS :: forall ans . (a -> ans) -> ans }
this works
newtype CPS a = CPS (forall ans . (a -> ans) -> ans)
Needless to say that I prefer the second variant (which Hugs happily
accepts).
Cheers, Ralf
More information about the Glasgow-haskell-bugs
mailing list