| however, you don't actually seem to do any lifting to merge
| the two foralls in front, and still claim that
|
|     c :: forall a b. (C a b) => forall a1. a1 -> b
|
| is a valid type - ghc disagrees!-) nesting foralls is ok, but
| nesting a forall in a context does not seem to be accepted.
|
| do you intend to change that (either the acceptance, or the
| output), or should i send my updated patches now?

I don't understand the issue here. That really *is* the type of c. What do you mean that ghc "disagrees"?

simply that ghc neither accepts nor infers that type:

   $ cat T.hs
   {-# OPTIONS_GHC -fglasgow-exts #-}
   module Main where
   class C a b where c1 :: forall a. a -> b
   c :: forall a b. (C a b) => forall a1. a1 -> b
   c = undefined

   $ ghc T.hs
T.hs:4:28: parse error on input `forall'

   -- comment out 'c', then
   $ ghc -fglasgow-exts -e ':t c1' T.hs
   c1 :: forall a a1 b. (C a b) => a1 -> b

i understand that the type given by printTyThing should
be equivalent to the one ghc likes to parser and infer,
but ghc doesn't seem to accept them as equivalent.

claus

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to