On Sun, Nov 16, 2008 at 2:01 PM, Claude Heiland-Allen <claudiusmaximus@goto10.org> wrote:

I don't know how evil those language extensions are, though - I just fiddled until it worked...

The only part of FlexibleInstances that you've used here is the ability to mention a type variable more than once in the instance.  I really wish this came with MultiParamTypeClasses.  My reasoning is this, FlexibleInstances turns on a lot of extra stuff, as do functional dependencies.  And yet, once you have multiparam type classes one of the natural things you want is the ability to mention a type variable more than once but currently you have to enable a lot of extra baggage to get that ability.

I'm not an expert, the way you've used them together seems quite sane and by using those extensions instead of some of the more powerful ones you've probably done yourself a favor :)

Jason