<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Sven,
<div class=""><br class="">
</div>
<div class="">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<div class="gmail_quote">
<div class="">[…] section 11.1 [of the Haskell 2010 Report] explicitly states that all derived operations for Eq and Ord are strict in both arguments.</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Good idea to look at the Report. Unfortunately it doesn’t give any reasoning as to
<i class="">why</i> this choice was made.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class=""><br class="">
</div>
<div class="">Vilem</div>
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 2 Jan 2019, at 19:06, Sven Panne <<a href="mailto:svenpanne@gmail.com" class="">svenpanne@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">Am Mi., 2. Jan. 2019 um 15:42 Uhr schrieb Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2017@jaguarpaw.co.uk" class="">tom-lists-haskell-cafe-2017@jaguarpaw.co.uk</a>>:<br class="">
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I mean that for any data type<br class="">
<br class="">
    data E of C1 | C2 | ...<br class="">
<br class="">
you are preposing that the (<=) of the derived Ord instance would have a<br class="">
special case for C1.<br class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">... and another special case for (>=) for the last enumeration value. And a very special version for one-element enumerations. And what about (<) and (>)? And derived (==) for one-element enumerations? And, and, and... :-P</div>
<div class=""><br class="">
</div>
<div class="">Putting on the language lawyer hat: The Haskell Report explicitly states that Bool's Ord instance is derived (section 6.1.1), and section 11.1 explicitly states that all derived operations for Eq and Ord are strict in both arguments. Consequently,
 Implementing Ord for Bool in a lazier way would violate the specification.</div>
<div class=""><br class="">
</div>
<div class="">I would say that the the way the report specifies this is a good thing: Coming up with special cases is a bad design principle, consistency almost always trumps anything else (the human brain is notoriously small). Furthermore, laziness is not
 always a good thing, it could lead to space leaks, so e.g. making Bool's Ord operations lazier would definitely make various people very unhappy sooner or later. :-)</div>
</div>
</div>
_______________________________________________<br class="">
Haskell-Cafe mailing list<br class="">
To (un)subscribe, modify options or view archives go to:<br class="">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="">
Only members subscribed via the mailman list are allowed to post.</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>