[Haskell-cafe] Newclasses

John Lato jwlato
Fri Oct 4 00:55:44 UTC 2013


Apologies, that wasn't finished.  I meant to say, does it mean that by
writing a BMonad instance a Monad instance would be automatically
generated?  If so, that seems like it would cause conflicts in many cases.
Regardless, I think "newclass" needs to be better specified if you want
other people to be able to support it.


On Thu, Oct 3, 2013 at 7:53 PM, John Lato <jwlato at gmail.com> wrote:

> 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/ade9250a/attachment.htm>



More information about the Haskell-Cafe mailing list