> There's no description of the multi-parameter type classes extension in the > 3.01 user manual; are the extensions implemented as described in the link > below? (I vaguely recollect Simon posting a message on this subject more > recently, but I couldn't find it.) > > http://www.cs.chalmers.se/~rjmh/Haskell/Messages/Display.cgi?id=171 Yes; except that -fallow-overlapping-instances does what it sounds like. It will permit overlapping instances provided one completely overlaps the other; e.g instance C [a] and instance C [Int]. But instanc C (a,Int) and instance C (Int,b) are not legal; becuase then we would not know which instance to use for C (Int,Int). >Choice 7a >~~~~~~~~~ >The context in a class declaration (which introduces superclasses) >must constrain only type variables. For example, this is legal: > > class (Foo a b, Baz b b) => Flob a b where... >but not > class (Foo [a] b, Baz (a,b) b) => Flob a b where ... > I tripped across an example from the literature that might motivate relaxing > this. It's the monad transformer class from the monadic modular > interpreters paper: > > class (Monad f, Monad (t f)) => MonadT t f where > lift :: f a -> t f a Thanks for the reminder about this. Examples of where Choice 7a is a really bad thing are still welcome! Simon