[Haskell-cafe] Class constraints with "free" type variables and fundeps
Francesco Mazzoli
f at mazzo.li
Sat Sep 29 02:04:51 CEST 2012
CCing the list back.
At Fri, 28 Sep 2012 13:30:52 -0700,
Alexander Solla wrote:
> What is the problem, exactly? It looks to me like UndecidableInstances and
> ScopedTypeVariables (on foo, or its arguments) would be enough.
I'm not sure what you mean. I don't see the need for UndecidableInstances, and
there is no way I can see to bring the `b' into scope in the type sig for foo,
ScopedTypeVariables or not - unless I'm missing something.
> Also note that as stated, foo's type "is a bottom" (more specifically, is a
> function onto bottom, since c is free in the class, and so foo must be
> parametrically polymorphic in its return type, and so is devoid of "real"
> Haskell values). Hopefully that is just an artefact of the translation to
> Foo's and Bar's.
Yeah the type for `foo' is irrelevant, I just needed to put something there.
--
Francesco * Often in error, never in doubt
More information about the Haskell-Cafe
mailing list