argument permutation and fundeps

Jeffrey R. Lewis
Thu, 10 May 2001 08:34:02 -0700

C T McBride wrote:

> Hi
> This is a long message, containing a program which makes heavy use of
> type classes with functional dependencies, and a query about how the
> typechecker treats them. It might be a bit of an effort, but I'd be
> grateful for any comment and advice more experienced Haskellers can
> spare the time to give me. Er, this ain't no undergrad homework...

Without delving too deeply into your example, it looks like you've bumped into a known bug in Hugs implementation of functional dependencies.  You should try GHCI if you can - it doesn't suffer from this bug.