[GHC] #8021: Multiple constraint classes - the alternative to superclass
GHC
ghc-devs at haskell.org
Sat Jun 29 00:25:37 CEST 2013
#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
More information about the ghc-tickets
mailing list