<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Yes I agree: native Int#!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> ghc-devs [mailto:ghc-devs-bounces@haskell.org]
<b>On Behalf Of </b>Carter Schonwald<br>
<b>Sent:</b> 15 August 2013 17:43<br>
<b>To:</b> Jan Stolarek<br>
<b>Cc:</b> ghc-devs<br>
<b>Subject:</b> Re: Change return type for Int64# and Word64# comparisons?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Please use native size. Eg&nbsp;Int# and/or Word#<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Booleans should always always&nbsp;be a size that fits in native registers. &nbsp;(If there's good reasons to the contrary, I'd love to hear them)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks Luite for noticing this!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
On Thursday, August 15, 2013, Jan Stolarek wrote:<o:p></o:p></p>
<p class="MsoNormal">&gt; for me personally Bool would be even better<br>
To get a Bool you can use wrappers defined in the same module, e.g.:<br>
<br>
geInt64# :: Int64# -&gt; Int64# -&gt; Bool<br>
geInt64# a b = tagToEnum# (int64ToInt# (geInt64## a b))<br>
<br>
Looking at the implementation of this wrapper I think Luite has a point - to get a Bool it has to be caste to a machine supported Int#. So I think that it would make sense to have these primops retunr Int# instead of Int64#, but I'd like to hear what others
 have to say.<br>
<br>
Janek<br>
<br>
<br>
<br>
<br>
----- Oryginalna wiadomość -----<br>
Od: &quot;Luite Stegeman&quot; &lt;<a href="javascript:;">stegeman@gmail.com</a>&gt;<br>
Do: &quot;ghc-devs&quot; &lt;<a href="javascript:;">ghc-devs@haskell.org</a>&gt;<br>
Wysłane: czwartek, 15 sierpień 2013 16:36:59<br>
Temat: Change return type for Int64# and Word64# comparisons?<br>
<br>
<br>
<br>
Hi all,<br>
<br>
<br>
With the recent change of comparison primops to return Int# instead of Bool, the 64 bit operations were also changed, to return Int64# or Word64#:<br>
<br>
<br>
<a href="https://github.com/jstolarek/packages-ghc-prim/commit/07920f03d76dbaec64e3829404d332af22d744fe" target="_blank">https://github.com/jstolarek/packages-ghc-prim/commit/07920f03d76dbaec64e3829404d332af22d744fe</a><br>
<br>
<br>
<br>
It seems a bit wasteful to me to return a value bigger than a machine word for just a boolean. Changing the type to Int# would make the same optimizations possible as for the native-sized primops (though &nbsp;since they map to JavaScript bools in GHCJS).<br>
<br>
<br>
thoughts?<br>
<br>
<br>
luite<br>
<br>
<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="javascript:;">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="javascript:;">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>