<p dir="ltr">It seems to me that Data.Functor.Classes is the natural place for these, but I guess I could stick them somewhere else.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 30, 2016 9:09 PM, "Mario Blažević" <<a href="mailto:blamario@ciktel.net">blamario@ciktel.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2016-09-30 07:25 PM, David Feuer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I've been playing around with the idea of writing Haskell 2010 type<br>
classes for finite sequences and non-empty sequences, somewhat similar<br>
to Michael Snoyman's Sequence class in mono-traversable. These are<br>
naturally based on Monoid1 and Semigroup1, which I think belong in base.<br>
<br>
</blockquote>
<br>
If the proposal is to add these directly to base, I'm against it. New classes should first be released in a regular package, and only moved to base once they prove useful.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
class Semigroup1 f where<br>
(<<>>) :: f a -> f a -> f a<br>
class Semigroup1 f => Monoid1 f where<br>
mempty1 :: f a<br>
<br>
Then I can write<br>
<br>
class (Monoid1 t, Traversable t) => Sequence t where<br>
singleton :: a -> t a<br>
-- and other less-critical methods<br>
<br>
class (Semigroup1 t, Traversable1 t) => NESequence where<br>
singleton1 :: a -> t a<br>
-- etc.<br>
<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/libraries</a><br>
</blockquote></div></div>