[Haskell-cafe] Repeating type variables in MultiParamTypeClasses instance heads
Viktor Dukhovni
ietf-dane at dukhovni.org
Thu May 6 21:05:04 UTC 2021
On Thu, May 06, 2021 at 10:51:32PM +0200, Henning Thielemann wrote:
> {-# LANGUAGE MultiParamTypeClasses #-}
> module FlexibleInstance where
>
> class C a b c where
This class has an empty interface, it just builds triples of types that
imply a constraint. No matter how many such triples one creates, there
can't be any conflict between them.
> instance C [a] [a] [b] where
> instance C [a] [b] [b] where
These don't conflict.
--
Viktor.
More information about the Haskell-Cafe
mailing list