Alternative.some and NonEmpty

Andrew Martin andrew.thaddeus at gmail.com
Mon Mar 6 15:49:03 UTC 2017


I would be in favor of adding the new function and against changing the
type signature of the existing one. The breakage from changing it would
just be too great.

-Andrew Martin

On Mon, Mar 6, 2017 at 3:39 AM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> On Sun, 5 Mar 2017, Vladislav Zavialov wrote:
>
> Since 'Data.List.NonEmpty' is now in 'base', it makes sense to change
>> the type of 'some' from
>>
>> some :: Alternative f => f a -> f [a]
>>
>> to
>>
>> some :: Alternative f => f a -> f (NonEmpty a)
>>
>> as it's guaranteed to return a non-empty list.
>>
>
> A less invasive way would be to add a new function with that type.
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>



-- 
-Andrew Thaddeus Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170306/4a7d852b/attachment.html>


More information about the Libraries mailing list