[Haskell-cafe] Newclasses

John Lato jwlato
Fri Oct 4 00:53:06 UTC 2013


I don't really understand what a "newclass" is supposed to be.


On Thu, Oct 3, 2013 at 2:15 PM, Wvv <vitea3v at rambler.ru> wrote:

>
>     newclass Bind a => Monad a => BMonad a where { (>>=) = (>>-) }


I think this means that `BMonad` is supposed to be a new class that has
both Bind and Monad in scope, the same as

  class (Bind a, Monad a) => BMonad a

except that the Monad instance's (>>=) is replaced by (>>-).

If that's what "newclass" means, it seems absolutely pointless.

Does it instead mean that one could write

  instance Bind MyType where

  instance BMonad MyType
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131003/d95f8e26/attachment.htm>



More information about the Haskell-Cafe mailing list