[Haskell-cafe] Splitting off many/some from Alternative
Bryan O'Sullivan
bos at serpentine.com
Wed Dec 14 18:37:25 CET 2011
On Tue, Dec 13, 2011 at 10:23 PM, Gregory Crosswhite
<gcrosswhite at gmail.com>wrote:
> This way users of the classes will know whether their type has
> well-defined instance for some and many or not.
>
But that's *precisely* what the Alternative class is already for! If you
are writing an Alternative instance *at all*, then you are asserting that
it *must* be possible and reasonable to replicate the existing behaviour
of some and many.
The fact that those functions are currently methods of the class is
completely irrelevant, and perhaps this is a source of your confusion. They
can be - *and used to be* - implemented as normal functions with
Alternative class constraints, then at some point someone moved them into
the class itself, solely to allow implementors to write faster versions.
I think we should take any further discussion off-list. Your messages from
last night betray a deep misunderstanding that I'm not sure everyone else
needs to sit through :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111214/1c2aeef3/attachment.htm>
More information about the Haskell-Cafe
mailing list