<div dir="auto">I think Michael Snoyman did a good job of starting that conversation with his IsSequence class in mono-traversable. I don't agree with a lot of the specific design decisions he's made, but I think we should definitely think about previous experience in that space.<div dir="auto"><br></div><div dir="auto">Personally, I prefer an MPTC-based interface for the monomorphic stuff. This is mostly a matter of taste, of course. <span style="font-family:sans-serif">One important idea, of course, is that of a free monoid:</span></div><div dir="auto"><br></div><div dir="auto">type family Elem xs</div><div dir="auto"><br></div><div dir="auto">class e ~ Elem c => MonoFoldable e c where</div><div dir="auto">  mfoldMap :: Monoid m => (e -> m) -> c -> m</div><div dir="auto"><br></div><div dir="auto">class (MonoFoldable e c, Monoid c) => MonoSequence e c where</div><div dir="auto">  mSingleton :: e -> c</div><div dir="auto">  -- All other methods can be optional</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">class (forall e. Monoid (t e)) => Monoid1 t</span><br></div><div dir="auto"><span style="font-family:sans-serif">instance (forall e. Monoid (t e)) => Monoid1 t</span><br></div><div dir="auto"><br></div><div dir="auto">class (Traversable t, Monoid1 t) => Sequence t where</div><div dir="auto">  singleton :: e -> t e</div><div dir="auto">  -- All other methods can be optional</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 12, 2019, 10:42 AM Andreas Abel <<a href="mailto:andreas.abel@ifi.lmu.de">andreas.abel@ifi.lmu.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think this proposal was be stronger if it would lay out the bigger <br>
picture, i.e., directions towards a unified interface to sequence-like <br>
collections.<br>
<br>
-1 in its current form.<br>
<br>
On 2019-09-11 16:32, Helmut Schmidt wrote:<br>
> Taylor,<br>
> <br>
> Is it really necessary for you to be so rude? I can assure you that my <br>
> proposal has been made in the same good faith as your proposal which <br>
> inspired mine.<br>
> <br>
> Besides that unnecessary snark you do make an excellent point regarding <br>
> the poor discoverability of the list constructor which I imagine must <br>
> cause a lot of confusion among newcomers.Thank you for keeping an open mind!<br>
> <br>
> <br>
> <br>
> Am Mi., 11. Sept. 2019 um 11:21 Uhr schrieb Taylor Fausak <br>
> <<a href="mailto:taylor@fausak.me" target="_blank" rel="noreferrer">taylor@fausak.me</a> <mailto:<a href="mailto:taylor@fausak.me" target="_blank" rel="noreferrer">taylor@fausak.me</a>>>:<br>
> <br>
>     I suspect this proposal was not made in good faith. I feel like it<br>
>     was meant to make fun of my list singleton proposal.<br>
> <br>
>     In spite of that, I am in favor of this proposal. One of the (very<br>
>     minor!) problems with lists in Haskell is that they can’t be<br>
>     documented with Haddock because they’re part of the syntax. For<br>
>     example, if you search Hoogle for `(:)` or `a -> [a] -> [a]` you<br>
>     won’t find the venerable list constructor. You will find `cons` from<br>
>     the `extra` package, which I think suggests that this proposal is a<br>
>     good idea.<br>
> <br>
>     +1<br>
> <br>
>      > On Sep 11, 2019, at 4:13 AM, Oliver Charles<br>
>     <<a href="mailto:ollie@ocharles.org.uk" target="_blank" rel="noreferrer">ollie@ocharles.org.uk</a> <mailto:<a href="mailto:ollie@ocharles.org.uk" target="_blank" rel="noreferrer">ollie@ocharles.org.uk</a>>> wrote:<br>
>      ><br>
>      > On Wed, Sep 11, 2019 at 7:36 AM Helmut Schmidt<br>
>      > <<a href="mailto:helmut.schmidt.4711@gmail.com" target="_blank" rel="noreferrer">helmut.schmidt.4711@gmail.com</a><br>
>     <mailto:<a href="mailto:helmut.schmidt.4711@gmail.com" target="_blank" rel="noreferrer">helmut.schmidt.4711@gmail.com</a>>> wrote:<br>
>      ><br>
>      >> I can't be the only that wants this function, right?<br>
>      ><br>
>      > You're not the only one! I would also like this function. In fact,<br>
>      > only yesterday I found myself writing<br>
>      ><br>
>      >  ( x : ) <$> recurse xs<br>
>      ><br>
>      > I would have preferred<br>
>      ><br>
>      >  cons x <$> recurse xs<br>
>      ><br>
>      > +1 to adding  cons :: x -> [x] -> [x]  to  Data.List.<br>
>      ><br>
>      > Ollie<br>
>      > _______________________________________________<br>
>      > Libraries mailing list<br>
>      > <a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a> <mailto:<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a>><br>
>      > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
> <br>
> <br>
> _______________________________________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
> <br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>