<div dir="ltr">This is just saying that the type of less is any function that takes two a&#39;s as parameters and returns a Bool result. This appears to be a formalization of the Ord (ordered) data type, where less would be used to compare two ordered values and return a Bool result, either True or False.<br>
<div><br></div><div style>Just a note that the data declaration above is missing a constructor name. It should probably be something like:</div><div style><br></div><div style>data Ord a = <b><i>Ord</i></b> { less :: a -&gt; a -&gt; Bool }</div>
<div style><br></div><div style><br></div><div style>Cheers,</div><div style>Darren</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 20, 2013 at 1:18 PM, Emanuel Koczwara <span dir="ltr">&lt;<a href="mailto:poczta@emanuelkoczwara.pl" target="_blank">poczta@emanuelkoczwara.pl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I&#39;m watching Philip Wadler &quot;Faith, Evolution, and Programming<br>
Languages&quot; (very cool by the way):<br>
<a href="http://www.youtube.com/watch?v=8frGknO8rIg" target="_blank">http://www.youtube.com/watch?v=8frGknO8rIg</a><br>
<br>
At 00:24:14 there is strange thing on the slide:<br>
<br>
data Ord a = { less :: a -&gt; a -&gt; Bool }<br>
<br>
It&#39;s first time I see function type (and where is definition?) in record<br>
syntax. Can somebody explain this?<br>
<br>
Emanuel<br>
<br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br></div>