<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>The criteria for determining this apparent danger, in all cases I
      have seen, is arbitrary nonsense. Try defining it in a coherent
      way.</p>
    <p>"But the inconsistency with my intuition for the function named
      l-e-n-g-t-h that I learned in C programming school in the 1980s"
      is the best criteria that I have seen, and which commands outright
      dismissal. I am sceptical of anything better, and therefore, worth
      considering.</p>
    <p>Other contenders:<br>
      * feels bad in my bones<br>
      * don't like it<br>
      * there's lots of us!<br>
    </p>
    <p>All these arguments have been, by moral imperative, and in
      practice, dismissed.<br>
    </p>
    <p>The length of ((,) a) is very definitely 1. That this is not
      bleedingly obvious, busted intuitions aside, is becoming more
      laborious as this not-really-debate drags on.<br>
    </p>
    <p>We have a kind system, we have a type system, we have
      parametricity. Use them. If you choose not to, fine, but don't try
      to take superior tools away from me for no benefit. I will stop
      you.<br>
    </p>
    <p>----</p>
    <p>An anecdote on danger. A twin piston engine aircraft recently
      crashed into a shopping centre on take-off from an airport in
      southern Australia. All onboard were killed. Nobody on the ground
      was injured. The cause is yet unknown and is under investigation.
      It is an unusual circumstance. A friend of mine declared to me
      that the airport should be closed. When I asked why, I was told,
      "I used to work in the same type of shopping centre, at a
      different airport, and I felt like I was in danger when aeroplanes
      flew overhead." It is extremely fortunate that we don't have such
      ridiculous assessments of danger dictating the policies of
      aviation safety. Indeed, flying aeroplanes is one very effective
      way to get away from that nonsense. Imagine if that "sense of
      danger" were to dictate aviation safety regulations. What a
      dangerous world we would be living in!<br>
      <br>
      ----<br>
    </p>
    <p>Ask yourself where the danger is and be reasonable about it. Hope
      that helps.<br>
    </p>
    <div class="moz-cite-prefix">On 20/03/17 10:30, <a class="moz-txt-link-abbreviated" href="mailto:amindfv@gmail.com">amindfv@gmail.com</a>
      wrote:<br>
    </div>
    <blockquote
      cite="mid:2219A25E-006B-4C1A-9EA1-0EED23D4AF81@gmail.com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html; charset=utf-8">
      <div><br>
      </div>
      <div><br>
        El 19 mar 2017, a las 17:19, Tony Morris <<a
          moz-do-not-send="true" href="mailto:tmorris@tmorris.net">tmorris@tmorris.net</a>>
        escribió:<br>
        <br>
      </div>
      <blockquote type="cite">
        <div>
          <div dir="ltr">
            <div>That you can't should be a hint that length for ((,) a)
              is very definitely 1.<br>
              <br>
            </div>
          </div>
        </div>
      </blockquote>
      <div><br>
      </div>
      <div>To be frank, this seems like a non-sequitur. Many of us find
        e.g.:</div>
      <div><br>
      </div>
      <div>length (_, _) = 1</div>
      <div>maximum (_, b) = b</div>
      <div><br>
      </div>
      <div>to be dangerous instances. We don't want to accidentally call
        them. We'd like a way to opt out or warn on use.</div>
      <div><br>
      </div>
      <div>The inability to opt out or be warned does not seem to me to
        be an argument that the above instances are good instances.</div>
      <div><br>
      </div>
      <div>Feel free to clarify if I haven't understood your point.</div>
      <div><br>
      </div>
      <div>Thanks!</div>
      <div>Tom</div>
      <div><br>
      </div>
      <br>
      <blockquote type="cite">
        <div>
          <div dir="ltr">Simply, use a different function, not length,
            which is well-defined for ((,) a) and other instances.<br>
          </div>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Mon, Mar 20, 2017 at 3:15 AM, <span
                dir="ltr"><<a moz-do-not-send="true"
                  href="mailto:amindfv@gmail.com" target="_blank">amindfv@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote">
                <div dir="auto">
                  <div>Is there a clear way to implement this instance
                    warning? I.e. given:</div>
                  <div><br>
                  </div>
                  <div>f x = 2 * length x</div>
                  <div><br>
                  </div>
                  <div>Can we guarantee at compile time that "f" will
                    never be passed a 2-tuple?</div>
                  <div><br>
                  </div>
                  <div>Tom</div>
                  <div>
                    <div class="h5">
                      <div><br>
                        El 18 mar 2017, a las 20:04, Adam Bergmark <<a
                          moz-do-not-send="true"
                          href="mailto:adam@bergmark.nl" target="_blank">adam@bergmark.nl</a>>
                        escribió:<br>
                        <br>
                      </div>
                      <blockquote type="cite">
                        <div>
                          <div dir="ltr">I'm on the fence about the
                            instance existing. I'm +1 for a warning, and
                            thus would be +1 on keeping the instance. +1
                            on making the warning opt-in and +1 keeping
                            it out of -Wall.
                            <div><br>
                              <div><br>
                              </div>
                            </div>
                          </div>
                          <br>
                          <div class="gmail_quote">
                            <div dir="ltr">On Sun, 19 Mar 2017 at 00:51
                              <<a moz-do-not-send="true"
                                href="mailto:amindfv@gmail.com"
                                target="_blank">amindfv@gmail.com</a>>
                              wrote:<br>
                            </div>
                            <blockquote class="gmail_quote"><br
                                class="m_-8946947274453652233gmail_msg">
                              <br
                                class="m_-8946947274453652233gmail_msg">
                              > El 18 mar 2017, a las 16:01, Lana
                              Black <<a moz-do-not-send="true"
                                href="mailto:lanablack@amok.cc"
                                target="_blank">lanablack@amok.cc</a>>
                              escribió:<br
                                class="m_-8946947274453652233gmail_msg">
                              ><br
                                class="m_-8946947274453652233gmail_msg">
                              >> On 18/03/17 19:49, Henning
                              Thielemann wrote:<br
                                class="m_-8946947274453652233gmail_msg">
                              >><br
                                class="m_-8946947274453652233gmail_msg">
                              >>> On Sat, 18 Mar 2017, Carter
                              Schonwald wrote:<br
                                class="m_-8946947274453652233gmail_msg">
                              >>><br
                                class="m_-8946947274453652233gmail_msg">
                              >>> for what?<br
                                class="m_-8946947274453652233gmail_msg">
                              >><br
                                class="m_-8946947274453652233gmail_msg">
                              >> A warning if someone e.g. calls
                              'length (a,b)', or more generally, if<br
                                class="m_-8946947274453652233gmail_msg">
                              >> certain instances are used.<br
                                class="m_-8946947274453652233gmail_msg">
                              >> ______________________________<wbr>_________________<br
                                class="m_-8946947274453652233gmail_msg">
                              >> Libraries mailing list<br
                                class="m_-8946947274453652233gmail_msg">
                              >> <a moz-do-not-send="true"
                                href="mailto:Libraries@haskell.org"
                                class="m_-8946947274453652233gmail_msg"
                                target="_blank">Libraries@haskell.org</a><br
                                class="m_-8946947274453652233gmail_msg">
                              >> <a moz-do-not-send="true"
                                href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries"
                                rel="noreferrer"
                                class="m_-8946947274453652233gmail_msg"
                                target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br
                                class="m_-8946947274453652233gmail_msg">
                              ><br
                                class="m_-8946947274453652233gmail_msg">
                              > Please no. Many of us like our code
                              Wall-clean while still being able to<br
                                class="m_-8946947274453652233gmail_msg">
                              > write polymorphic functions. Adding
                              more warnings that are often<br
                                class="m_-8946947274453652233gmail_msg">
                              > triggered by correct code (redundant
                              constraints, anyone?) only leads to<br
                                class="m_-8946947274453652233gmail_msg">
                              > more headache.<br
                                class="m_-8946947274453652233gmail_msg">
                              ><br
                                class="m_-8946947274453652233gmail_msg">
                              > You could make that an hlint rule on
                              the other hand.<br
                                class="m_-8946947274453652233gmail_msg">
                              <br
                                class="m_-8946947274453652233gmail_msg">
                              Can it be a hlint rule? It seems quite
                              difficult to predict that "length" will
                              not ever be passed e.g. a 2-tuple in the
                              general case, within hlint.<br
                                class="m_-8946947274453652233gmail_msg">
                              <br
                                class="m_-8946947274453652233gmail_msg">
                              I would also favor a warning, and happily
                              have -Wall not include it (though I'd
                              prefer inclusion).<br
                                class="m_-8946947274453652233gmail_msg">
                              <br
                                class="m_-8946947274453652233gmail_msg">
                              Tom<br
                                class="m_-8946947274453652233gmail_msg">
                              <br
                                class="m_-8946947274453652233gmail_msg">
                              <br
                                class="m_-8946947274453652233gmail_msg">
                              > ______________________________<wbr>_________________<br
                                class="m_-8946947274453652233gmail_msg">
                              > Libraries mailing list<br
                                class="m_-8946947274453652233gmail_msg">
                              > <a moz-do-not-send="true"
                                href="mailto:Libraries@haskell.org"
                                class="m_-8946947274453652233gmail_msg"
                                target="_blank">Libraries@haskell.org</a><br
                                class="m_-8946947274453652233gmail_msg">
                              > <a moz-do-not-send="true"
                                href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries"
                                rel="noreferrer"
                                class="m_-8946947274453652233gmail_msg"
                                target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br
                                class="m_-8946947274453652233gmail_msg">
                              ______________________________<wbr>_________________<br
                                class="m_-8946947274453652233gmail_msg">
                              Libraries mailing list<br
                                class="m_-8946947274453652233gmail_msg">
                              <a moz-do-not-send="true"
                                href="mailto:Libraries@haskell.org"
                                class="m_-8946947274453652233gmail_msg"
                                target="_blank">Libraries@haskell.org</a><br
                                class="m_-8946947274453652233gmail_msg">
                              <a moz-do-not-send="true"
                                href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries"
                                rel="noreferrer"
                                class="m_-8946947274453652233gmail_msg"
                                target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br
                                class="m_-8946947274453652233gmail_msg">
                            </blockquote>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                  </div>
                </div>
                <br>
                ______________________________<wbr>_________________<br>
                Libraries mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
                <a moz-do-not-send="true"
                  href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries"
                  rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
                <br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>