<div dir="ltr">The nice thing about such a module is anybody can package it up. It needs nothing special from base. During the discussion about Foldable, the option to add a Data.List.Explicit or something that contained just the monomorphic variants was brought up as something we could add, but nobody really got enthusiastic over the idea.<div></div><div><br></div><div>The state of Data.List today is a messy intermediate state:</div><div><br></div><div><a href="https://ghc.haskell.org/trac/ghc/wiki/Prelude710/FTP#list">https://ghc.haskell.org/trac/ghc/wiki/Prelude710/FTP#list</a><br></div><div><br></div><div>When and if we get a resolution to <a href="https://ghc.haskell.org/trac/ghc/ticket/4879">https://ghc.haskell.org/trac/ghc/ticket/4879</a> we're likely to proceed with option 1 from that FTP page, which will at least avoid Data.List.concat having the too general type, by dint of it no longer existing.</div><div><br></div><div><div>-Edward</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 2, 2017 at 2:17 PM, Andreas Abel <span dir="ltr"><<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank">andreas.abel@ifi.lmu.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We could have a module<br>
<br>
  Data.List.ReallyJustListsAndNo<wbr>tSomeThingMoreGeneric<br>
<br>
which implements concat and friends just for lists and could be imported if one wants to have the list operations.  Currently,<br>
<br>
  import qualified Data.List as List<br>
<br>
does not give on the list operations as e.g.<br>
<br>
  List.concat<br>
<br>
but the generic ones.<br>
<br>
See also <a href="http://ghc.haskell.org/trac/ghc/ticket/13345" rel="noreferrer" target="_blank">http://ghc.haskell.org/trac/gh<wbr>c/ticket/13345</a><span class=""><br>
<br>
On 02.03.2017 20:02, Edward Kmett wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
On Thu, Mar 2, 2017 at 11:59 AM, Andreas Abel <<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank">andreas.abel@ifi.lmu.de</a><br></span><span class="">
<mailto:<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank">andreas.abel@ifi.lmu.d<wbr>e</a>>> wrote:<br>
<br>
    Ok, Foldable is a formal condition for Traversable, but not actually<br>
    used in the implementation of Traversable Either.  This still leaves<br>
    room to implement Foldable for Either by<br>
<br>
      instance Foldable (Either a) where<br>
        foldMap _ _ = error "Folding Either?  Naah, I don't think this<br>
    is a good idea."<br>
<br>
<br>
This would change the semantic of every<br>
<br>
forM_ myeither $ \i -> ....<br>
<br>
in existing code to silent errors.<br>
<br>
Hell no.<br>
<br>
-Edward<br>
<br>
<br>
    On 02.03.2017 17:48, David Feuer wrote:<br>
<br>
        The problem is that we'd then lose the perfectly good Traversable<br>
        instance, which would be sad.<br>
<br>
        On Mar 2, 2017 11:23 AM, "Andreas Abel" <<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank">andreas.abel@ifi.lmu.de</a><br>
        <mailto:<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank">andreas.abel@ifi.lmu.d<wbr>e</a>><br></span>
        <mailto:<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank">andreas.abel@ifi.lmu.d<wbr>e</a><div><div class="h5"><br>
        <mailto:<a href="mailto:andreas.abel@ifi.lmu.de" target="_blank">andreas.abel@ifi.lmu.d<wbr>e</a>>>> wrote:<br>
<br>
            Today a student came to me wondering why a certain function<br>
        produced<br>
            a regular result, where he had expected an error.  Turned<br>
        out he had<br>
            used `concat`, but not on a lists of lists as he had<br>
        thought, but on<br>
            a lists of `Either a [b]`.<br>
<br>
            With the Foldable instance for Either, which considers<br>
        Either a b to<br>
            be a container of 0-1 elements of b, errors are happily<br>
        swallowed.<br>
<br>
            I think this instance is harmful and should be deprecated<br>
        (and later<br>
            removed) from base.<br>
<br>
            There are similarly pointless Foldable instances as well.<br>
<br>
            See a discussion one year ago, which was heated, but had no<br>
            consequences.<br>
<br>
<br>
        <a href="https://mail.haskell.org/pipermail/libraries/2016-February/026678.html" rel="noreferrer" target="_blank">https://mail.haskell.org/piper<wbr>mail/libraries/2016-February/<wbr>026678.html</a><br>
        <<a href="https://mail.haskell.org/pipermail/libraries/2016-February/026678.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipe<wbr>rmail/libraries/2016-February/<wbr>026678.html</a>><br>
<br>
        <<a href="https://mail.haskell.org/pipermail/libraries/2016-February/026678.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipe<wbr>rmail/libraries/2016-February/<wbr>026678.html</a><br>
        <<a href="https://mail.haskell.org/pipermail/libraries/2016-February/026678.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipe<wbr>rmail/libraries/2016-February/<wbr>026678.html</a>>><br>
<br>
<br>
            --<br>
            Andreas Abel  <><      Du bist der geliebte Mensch.<br>
<br>
            Department of Computer Science and Engineering<br>
            Chalmers and Gothenburg University, Sweden<br>
<br>
            <a href="mailto:andreas.abel@gu.se" target="_blank">andreas.abel@gu.se</a> <mailto:<a href="mailto:andreas.abel@gu.se" target="_blank">andreas.abel@gu.se</a>><br></div></div>
        <mailto:<a href="mailto:andreas.abel@gu.se" target="_blank">andreas.abel@gu.se</a> <mailto:<a href="mailto:andreas.abel@gu.se" target="_blank">andreas.abel@gu.se</a>>><span class=""><br>
            <a href="http://www.cse.chalmers.se/~abela/" rel="noreferrer" target="_blank">http://www.cse.chalmers.se/~ab<wbr>ela/</a><br>
        <<a href="http://www.cse.chalmers.se/~abela/" rel="noreferrer" target="_blank">http://www.cse.chalmers.se/~a<wbr>bela/</a>><br>
        <<a href="http://www.cse.chalmers.se/~abela/" rel="noreferrer" target="_blank">http://www.cse.chalmers.se/~a<wbr>bela/</a><br>
        <<a href="http://www.cse.chalmers.se/~abela/" rel="noreferrer" target="_blank">http://www.cse.chalmers.se/~a<wbr>bela/</a>>><br>
            ______________________________<wbr>_________________<br>
            Libraries mailing list<br>
            <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a> <mailto:<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a>><br></span>
        <mailto:<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a> <mailto:<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a>><wbr>><span class=""><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>
        <<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-b<wbr>in/mailman/listinfo/libraries</a>><br>
            <<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-b<wbr>in/mailman/listinfo/libraries</a><br>
        <<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-b<wbr>in/mailman/listinfo/libraries</a>><wbr>><br>
<br>
<br>
<br>
    --<br>
    Andreas Abel  <><      Du bist der geliebte Mensch.<br>
<br>
    Department of Computer Science and Engineering<br>
    Chalmers and Gothenburg University, Sweden<br>
<br>
    <a href="mailto:andreas.abel@gu.se" target="_blank">andreas.abel@gu.se</a> <mailto:<a href="mailto:andreas.abel@gu.se" target="_blank">andreas.abel@gu.se</a>><br>
    <a href="http://www.cse.chalmers.se/~abela/" rel="noreferrer" target="_blank">http://www.cse.chalmers.se/~ab<wbr>ela/</a> <<a href="http://www.cse.chalmers.se/~abela/" rel="noreferrer" target="_blank">http://www.cse.chalmers.se/~a<wbr>bela/</a>><br>
    ______________________________<wbr>_________________<br>
    Libraries mailing list<br>
    <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a> <mailto:<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>
    <<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-b<wbr>in/mailman/listinfo/libraries</a>><br>
<br>
<br>
</span></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
-- <br>
Andreas Abel  <><      Du bist der geliebte Mensch.<br>
<br>
Department of Computer Science and Engineering<br>
Chalmers and Gothenburg University, Sweden<br>
<br>
<a href="mailto:andreas.abel@gu.se" target="_blank">andreas.abel@gu.se</a><br>
<a href="http://www.cse.chalmers.se/~abela/" rel="noreferrer" target="_blank">http://www.cse.chalmers.se/~ab<wbr>ela/</a><br>
</div></div></blockquote></div><br></div>