
#8021: Multiple constraint classes - the alternative to superclass -----------------------------+---------------------------------------------- Reporter: wvv | Owner: Type: feature request | Status: new Priority: normal | Component: Compiler Version: 7.6.3 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Comment(by wvv): And you could allow to write classes as these: {{{ class interface Monoid where where -- Constructor (!) must be empty mempty :: * -- kinds only mappend :: * -> * -> * -- kinds only class Mononoid a where ... class Mononoid m where ... }}} Inside class interface constructor must be empty, because: {{{ () => Monoid a :: * Monad m => Monoid m :: * -> * Arrow c => Monoid c :: * -> * -> * }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/8021#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler