[Haskell-cafe] Repeating type variables in MultiParamTypeClasses instance heads

Henning Thielemann lemming at henning-thielemann.de
Thu May 6 20:51:32 UTC 2021


On Thu, 6 May 2021, Leif-Erik Kr├╝ger wrote:

> So, is there a good reason for the design choice of allowing these kinds 
> of overlap without FlexibleInstances? Am I missing something here?

I am surprised. I just tried it with different GHC versions, all of them 
accept those overlapping instances without enabling FlexibleInstances.


{-# LANGUAGE MultiParamTypeClasses #-}
module FlexibleInstance where

class C a b c where
instance C [a] [a] [b] where
instance C [a] [b] [b] where


More information about the Haskell-Cafe mailing list