
Hello Andrew,
On 7/25/05, Andrew Pimlott
getCC :: Cont r (Cont r a) getCC = ccc (\(c :: Cont r a -> (forall b. Cont r b)) -> let x :: forall b. Cont r b = c x in x)
gives
[Error]
ghc-6.2 accepts this: getCC :: Cont r (Cont r a) getCC = ccc (\(c :: Cont r a -> (forall b. Cont r b)) -> let x :: forall b. Cont r b; x = c x in c x) ghc-6.4/6.5 will also give the mysterious error above, but the following works fine, thanks to scoped type variables: getCC :: forall a r. Cont r (Cont r a) getCC = ccc (\c -> let x :: forall b. Cont r b; x = c x in x)
for which I have no riposte. Is this a bug? I would think so. I can't find anything in the documentation that disallows such polymorphic type annotations.
Thomas