Hi,
During experiments with Haskell type system I noticed following incompatibility between a plain class constraint and a constraint kind:
type ConstrList = [ Show, Read ] -- ok
type ShowRead a = (Show a, Read a)
type ConstrList = [ ShowRead ]
-- error: Expected kind ‘[* -> Constraint]’, but ‘[ShowRead]’ has kind ‘*’
Looks like ShowRead is expanded as tuple.
-- hint doesn't help
type ShowRead :: * -> Constraint
Why constraint kind is not expanded as follows:
{-# LANGUAGE UndecidableInstances #-} -- local
class (Show a, Read a) => ShowRead a
instance (Show a, Read a) => ShowRead a