[Haskell-cafe] Haskell spec vs FlexibleInstances

Casey McCann cam at uptoisomorphism.net
Fri Feb 28 14:44:19 UTC 2014


On Thu, Feb 27, 2014 at 8:32 PM, Karl Voelker <karl at karlv.net> wrote:
> The spec doesn't allow multi-parameter type classes at all, so I don't see how you could run into this problem while writing extensionless Haskell.
>
> I guess it's still a valid question whether the MultiParamTypeClasses extension should allow repeated type parameters.

The restriction to distinct type variables, and the resulting issues
with unification, apply equally to instances for applied type
constructors. This disallows e.g. writing a Monoid instance for (a ->
a) directly without a newtype wrapper, not that we'd want to do that
anyway.

- C.


More information about the Haskell-Cafe mailing list