[Haskell-cafe] Re: Problem with fundeps.
Ashley Yakeley
ashley at semantic.org
Sun Jan 2 17:04:31 EST 2005
In article <courier.41D863C1.00005081 at averell>, karczma at info.unicaen.fr
wrote:
GHCi is correct to complain:
> class Vspace a v | v -> a
OK, the first parameter ("a") depends on the second ("v").
> instance Vspace a a where
And this determines it: the first parameter must always be the same as
the second.
> instance (Vspace a v) => Vspace a (c->v) where
This is incompatible with the previous instance declaration, since "a"
is not the same as "c -> v". And any instance decl that were permitted
by the fundep would in any case overlap.
--
Ashley Yakeley, Seattle WA
More information about the Haskell-Cafe
mailing list