[Haskell-cafe] A type class puzzle
jbapple+haskell-cafe at gmail.com
Sat Nov 4 16:54:46 EST 2006
On 11/2/06, Yitzchak Gale <gale at sefer.org> wrote:
> GHC says:
> Functional dependencies conflict between instance declarations:
> instance Replace Zero a a (a -> a -> a)
> instance (...) => Replace (Succ n) a [l] f'
> Not true. The type constraints on the second instance
> prevent any overlap.
GHC doesn't take constraints into account when checking fundeps.
You're looking for Sulzmann's Chameleon, which does all sorts of
Also, I'd be surprized if Oleg didn't have a work-around in GHC.
More information about the Haskell-Cafe