Hi!

It seems as the functional dependencies are not working as well as they
should.

Suppose I have the following class:

\begin{code}
class A a b | a -> b where
  foo :: a b
\end{code}

and then I declare the following type:

\begin{code}
newtype Foo = Bar (forall a b. A a b => a Int)
\end{code}

Loading this in hugs gives the following error message:
ERROR HugsBug.lhs:9 - Ambiguous type signature in type component
*** ambiguous type : A a b => a Int

But the type is clearly not ambiguous since the functional dependency
determines b whenever a is known.

        /Josef


_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to