No subject


Thu Jan 10 18:17:16 CET 2013


ntegrate' fails (exit code 138), whereas the trunk-compiled one does not.

The last time I merged before was November 8, and everything was fine, just=
 as I left it in September.

So far, the only difference I can see in the W/W code is that the new-deman=
d compiler makes more aggressive split for the arguments of `integrate1D` (=
see ww-new.log in the attachment), which seems to be correct to me, as thes=
e arguments are used strictly.

The compiler from the trunk, however, keeps these arguments boxed, which su=
rprises me (ww-trunk.log).

I'm not entirely sure, but it might affect the unpacking strategy on later =
stages of the simplifier.

It would be helpful to know what else I can do to debug this inconsistency.

Thanks.

Best regards,
Ilya
On Sun, Dec 23, 2012 at 8:10 PM, Simon Peyton-Jones <simonpj at microsoft.com<=
mailto:simonpj at microsoft.com>> wrote:
However, now we have a problem: for one test from nofib, namely imaginary/i=
ntegrate, the optimizer changes the semantics, so the program fails.

Can you be more specific?  How does the semantics change? How do you know i=
t is changed?  Is this a recent change?

Simon

From: ilyas239 at gmail.com<mailto:ilyas239 at gmail.com> [mailto:ilyas239 at gmail.=
com<mailto:ilyas239 at gmail.com>] On Behalf Of Ilya Sergey
Sent: 22 December 2012 19:04
To: Simon Peyton-Jones
Subject: Re: Cardinality

Dear Simon.

Today I spent some time merging 'master' into the 'new-demand-to-merge' bra=
nch.

It went fine, and I managed to compile it and run the nofib, and results *a=
lmost* didn't change: the new strictness analyzer still does better in most=
 of the cases than the old one.

However, now we have a problem: for one test from nofib, namely imaginary/i=
ntegrate, the optimizer changes the semantics, so the program fails.
It is quite strange, as from the perspective of the demand analyser the res=
ults are similar.

As I haven't changed anything in the analysis or the worker/wrapper split, =
I tend to think it might be the refactoring of the unpacking strategy that =
clashed with the current logic of W/W.

Shall I merge the 'master' into 'new-demand' branch ignoring this issue, or=
 should I keep things as they are, so you could take a look on it and merge=
 it yourself?

Kind regards,
Ilya

On Sat, Dec 22, 2012 at 2:30 AM, Ilya Sergey <ilya.sergey at gmail.com<mailto:=
ilya.sergey at gmail.com>> wrote:
Dear Simon.

Thank you for the example. I will definitely compile something like this an=
d check the memory consumption.
I also have to implement the changes suggested by you and Dimitrios for sin=
gle-used thunks.

The cardinality branch was up-to date with the trunk (and the new demand br=
anch) by mid-November.
Yesterday I tried to update it, but by some mysterious reasons I could not =
compile the current trunk (getting seg-fault).

I suspect it might be because of some outdated cabal packages. So once I ge=
t the trunk compiled, I will bring both new demand and cardinality branch u=
p to date.

I'm still in Saint Petersburg, and will be here until mid-January, waiting =
for my Spanish visa.
Next week I have a deadline for our SCP invited paper, and then for a few w=
eeks I will be focusing exclusively on the cardinality and demand work.

Merry Christmas and happy holidays to you and your family!

With best regards,
Ilya

On Fri, Dec 21, 2012 at 9:51 PM, Simon Peyton-Jones <simonpj at microsoft.com<=
mailto:simonpj at microsoft.com>> wrote:
Ilya

I've found an example where cardinality will really help: CPS code.

For example, deriving( Read ) generates code (in HEAD, soon) like this

expectP x (\v1 -> expectP y (\v2 -> expectP z (\v3 -> ...)))

Then the full-laziness (float-out) pass tries to float out lets from those =
lambdas, because it thinks they may be called many times. But actually they=
 are only called once ... they are continuations ... and the cardinality an=
alysis will discover that I think.

I hope to get to this in the new year. What is the state of the cardinality=
 branch?
I hope you are enjoying Madrid

Simon








--_000_59543203684B2244980D7E4057D5FBC1476BE3E6DB3EX14MBXC306e_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.apple-tab-span
	{mso-style-name:apple-tab-span;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Verdana","sans-serif";
	color:#1F497D;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";
	mso-fareast-language:EN-GB;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
@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=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-GB" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ve=
rdana&quot;,&quot;sans-serif&quot;;color:#1F497D">I don&#8217;t know how to=
 account for that.&nbsp; Make sure you are compiling everything with &#8211=
;dcore-lint.&nbsp; I guess you are on a Mac?&nbsp; I&#8217;m using 64-bit L=
inux.&nbsp; Is it definitely
 ok with the old demand analyser?&nbsp; <o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ve=
rdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ve=
rdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Note for others: this is =
nofib/imaginary/integrate.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ve=
rdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ve=
rdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Simon<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ve=
rdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><=
/p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal"><b><span lang=3D"EN-US" style=3D"font-size:10.0pt;fo=
nt-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span =
lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quot;Tahoma&quot;,&qu=
ot;sans-serif&quot;"> ilyas239 at gmail.com [mailto:ilyas239 at gmail.com]
<b>On Behalf Of </b>Ilya Sergey<br>
<b>Sent:</b> 16 January 2013 17:25<br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Subject:</b> Re: Cardinality<o:p></o:p></span></p>
</div>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">I run nofib and at some point I get the following ou=
tput:<o:p></o:p></p>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<p class=3D"MsoNormal">=3D=3Dnofib=3D=3D integrate: time to run integrate f=
ollows...<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">../../runstdtest/runstdtest ./integrate &nbsp;-o1 in=
tegrate.stdout -o1 integrate.stdout &nbsp;-ghc-timing &nbsp;&#43;RTS -K20m =
-H100m -RTS &nbsp; &nbsp;50000; &nbsp; ../../runstdtest/runstdtest ./integr=
ate &nbsp;-o1 integrate.stdout -o1 integrate.stdout &nbsp;-ghc-timing &nbsp=
;&#43;RTS -K20m
 -H100m -RTS &nbsp; &nbsp;50000; &nbsp; ../../runstdtest/runstdtest ./integ=
rate &nbsp;-o1 integrate.stdout -o1 integrate.stdout &nbsp;-ghc-timing &nbs=
p;&#43;RTS -K20m -H100m -RTS &nbsp; &nbsp;50000; &nbsp; ../../runstdtest/ru=
nstdtest ./integrate &nbsp;-o1 integrate.stdout -o1 integrate.stdout &nbsp;=
-ghc-timing &nbsp;&#43;RTS
 -K20m -H100m -RTS &nbsp; &nbsp;50000; &nbsp; ../../runstdtest/runstdtest .=
/integrate &nbsp;-o1 integrate.stdout -o1 integrate.stdout &nbsp;-ghc-timin=
g &nbsp;&#43;RTS -K20m -H100m -RTS &nbsp; &nbsp;50000;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">/bin/sh: line 1: 33635 Bus error: 10 &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; ././integrate &#43;RTS -s/var/folders/c1/pbj77lbx6fnc3q=
kj984xp44h0000gn/T//stats33626 -RTS &#43;RTS -K20m -H100m -RTS 50000 &lt; /=
dev/null &gt; /var/folders/c1/pbj77lbx6fnc3qkj984xp44h0000gn/T//runtest3362=
6.1.raw
 2&gt; /var/folders/c1/pbj77lbx6fnc3qkj984xp44h0000gn/T//runtest33626.2.raw=
 3&gt; /var/folders/c1/pbj77lbx6fnc3qkj984xp44h0000gn/T//runtest33626.3.raw=
<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">real<span class=3D"apple-tab-span">&nbsp;&nbsp;&nbsp=
;&nbsp; </span>0m0.922s<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">user<span class=3D"apple-tab-span">&nbsp;&nbsp;&nbsp=
; </span>0m0.004s<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">sys<span class=3D"apple-tab-span">&nbsp;&nbsp;&nbsp;=
&nbsp; </span>0m0.009s<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">././integrate &#43;RTS -K20m -H100m -RTS 50000 &lt; =
/dev/null<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">**** expected exit status 0 not seen ; got 138<o:p><=
/o:p></p>
</div>
<div>
<p class=3D"MsoNormal">/bin/sh: line 1: 33651 Bus error: 10 &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp;&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">If I remove integrate from the nofib Makefile, the r=
est of the benchmarks works just fine.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Ilya<o:p></o:p></p>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class=3D"MsoNormal">On Wed, Jan 16, 2013 at 9:19 PM, Simon Peyton-Jones =
&lt;<a href=3D"mailto:simonpj at microsoft.com" target=3D"_blank">simonpj at micr=
osoft.com</a>&gt; wrote:<o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">no, I don&#8217;t.&nbsp; That&#8217;s o=
dd.&nbsp; How does it manifest for you?</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">S</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><b><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quo=
t;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang=3D"EN-US"=
 style=3D"font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&=
quot;">
<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas239 at gmail.com<=
/a> [mailto:<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas23=
9 at gmail.com</a>]
<b>On Behalf Of </b>Ilya Sergey<br>
<b>Sent:</b> 16 January 2013 17:13</span><o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal"><br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Subject:</b> Re: Cardinality<o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Thank you.<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">I ran nofib myself too, and it seems to be fine, except that issue=
 with imaginary/integrate.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Did you have that error when running nofib as well?<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;margin-bottom:12.0p=
t">Ilya<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">On Wed, Jan 16, 2013 at 5:39 PM, Simon Peyton-Jones &lt;<a href=3D=
"mailto:simonpj at microsoft.com" target=3D"_blank">simonpj at microsoft.com</a>&=
gt; wrote:<o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">fixed thanks.</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">I&#8217;m doing another nofib run now.<=
/span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">S</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><b><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quo=
t;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang=3D"EN-US"=
 style=3D"font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&=
quot;">
<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas239 at gmail.com<=
/a> [mailto:<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas23=
9 at gmail.com</a>]
<b>On Behalf Of </b>Ilya Sergey<br>
<b>Sent:</b> 16 January 2013 12:38</span><o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Subject:</b> Re: Cardinality<o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Hi Simon.<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">I tried to build from the `new-demand-to-merge` branch recently, a=
nd I got the following Lint error when building libraries/base/GHC/Event/Ar=
ray.hs by a stage-1 compiler:<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">*** Core Lint errors : in result of Common sub-expression ***<o:p>=
</o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&lt;no location info&gt;: Warning:<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp; &nbsp; In a case alternative: (GHC.ForeignPtr.ForeignPtr fo=
_s3mr :: GHC.Prim.Addr#,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ds1_s3mq :: GHC.ForeignPtr.=
ForeignPtrContents)<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp; &nbsp; Occurrence of a dead Id wild_s3ms<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Any ideas, how it could be fixed, so I could integrate your change=
s into the cardinality branch and run the experiments?<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Kind regards,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Ilya<o:p></o:p></p>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">On Tue, Jan 8, 2013 at 11:22 PM, Simon Peyton-Jones &lt;<a href=3D=
"mailto:simonpj at microsoft.com" target=3D"_blank">simonpj at microsoft.com</a>&=
gt; wrote:<o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">ok. busy working on it now.&nbsp;
</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><b><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quo=
t;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang=3D"EN-US"=
 style=3D"font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&=
quot;">
<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas239 at gmail.com<=
/a> [mailto:<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas23=
9 at gmail.com</a>]
<b>On Behalf Of </b>Ilya Sergey<br>
<b>Sent:</b> 07 January 2013 11:53</span><o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Subject:</b> Re: Cardinality<o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Great, thank you.<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Please, let me know when it's in the stable state, so I could impl=
ement the optimisation making use of single-used thunks (and it would not i=
nterfere with your changes).<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Kind regards,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;margin-bottom:12.0p=
t">Ilya<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">On Fri, Jan 4, 2013 at 3:11 PM, Simon Peyton-Jones &lt;<a href=3D"=
mailto:simonpj at microsoft.com" target=3D"_blank">simonpj at microsoft.com</a>&g=
t; wrote:<o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">I&#8217;ve been working on the code.&nb=
sp; Will commit shortly.&nbsp; Integrate seems ok, happily.</span><o:p></o:=
p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D"><br>
SImon</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><b><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quo=
t;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang=3D"EN-US"=
 style=3D"font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&=
quot;">
<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas239 at gmail.com<=
/a> [mailto:<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas23=
9 at gmail.com</a>]
<b>On Behalf Of </b>Ilya Sergey<br>
<b>Sent:</b> 23 December 2012 16:57</span><o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Subject:</b> Re: Cardinality<o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Hi Simon.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">From what I can observe, after the trivial merge the new-demand co=
mpiled 'integrate' fails (exit code 138), whereas the trunk-compiled one do=
es not.<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">The last time I merged before was November 8, and everything was f=
ine, just as I left it in September.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">So far, the only difference I can see in the W/W code is that the =
new-demand compiler makes more aggressive split for the arguments of `integ=
rate1D` (see ww-new.log in the attachment),
 which seems to be correct to me, as these arguments are used strictly.<o:p=
></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">The compiler from the trunk, however, keeps these arguments boxed,=
 which surprises me (ww-trunk.log).&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">I'm not entirely sure, but it might affect the unpacking strategy =
on later stages of the simplifier.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">It would be helpful to know what else I can do to debug this incon=
sistency.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Thanks.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Best regards,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;margin-bottom:12.0p=
t">Ilya<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">On Sun, Dec 23, 2012 at 8:10 PM, Simon Peyton-Jones &lt;<a href=3D=
"mailto:simonpj at microsoft.com" target=3D"_blank">simonpj at microsoft.com</a>&=
gt; wrote:<o:p></o:p></p>
<div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto;margin-left:36.0pt">
However, now we have a problem: for one test from nofib, namely imaginary/i=
ntegrate, the optimizer changes the semantics, so the program fails.&nbsp;<=
o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">Can you be more specific?&nbsp; How doe=
s the semantics change? How do you know it is changed?&nbsp; Is this
 a recent change?<br>
<br>
Simon</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-size:11.0pt;font-family:&quot;Verdana&quot;,&q=
uot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><b><span lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:&quo=
t;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang=3D"EN-US"=
 style=3D"font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&=
quot;">
<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas239 at gmail.com<=
/a> [mailto:<a href=3D"mailto:ilyas239 at gmail.com" target=3D"_blank">ilyas23=
9 at gmail.com</a>]
<b>On Behalf Of </b>Ilya Sergey<br>
<b>Sent:</b> 22 December 2012 19:04<br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Subject:</b> Re: Cardinality</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Dear Simon.<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Today I spent some time merging 'master' into the 'new-demand-to-m=
erge' branch.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">It went fine, and I managed to compile it and run the nofib, and r=
esults *almost* didn't change: the new strictness analyzer still does bette=
r in most of the cases than the old
 one.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">However, now we have a problem: for one test from nofib, namely im=
aginary/integrate, the optimizer changes the semantics, so the program fail=
s.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">It is quite strange, as from the perspective of the demand analyse=
r the results are similar.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">As I haven't changed anything in the analysis or the worker/wrappe=
r split, I tend to think it might be the refactoring of the unpacking strat=
egy that clashed with the current logic
 of W/W.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Shall I merge the 'master' into 'new-demand' branch ignoring this =
issue, or should I keep things as they are, so you could take a look on it =
and merge it yourself?<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Kind regards,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Ilya<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">On Sat, Dec 22, 2012 at 2:30 AM, Ilya Sergey &lt;<a href=3D"mailto=
:ilya.sergey at gmail.com" target=3D"_blank">ilya.sergey at gmail.com</a>&gt; wro=
te:<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Dear Simon.<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Thank you for the example. I will definitely compile something lik=
e this and check the memory consumption.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">I also have to implement the changes suggested by you and Dimitrio=
s for single-used thunks.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">The cardinality branch was up-to date with the trunk (and the new =
demand branch) by mid-November.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Yesterday I tried to update it, but by some mysterious reasons I c=
ould not compile the current trunk (getting seg-fault).&nbsp;<o:p></o:p></p=
>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">I suspect it might be because of some outdated cabal packages. So =
once I get the trunk compiled, I will bring both new demand and cardinality=
 branch up to date.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">I'm still in Saint Petersburg, and will be here until mid-January,=
 waiting for my Spanish visa.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Next week I have a deadline for our SCP invited paper, and then fo=
r a few weeks I will be focusing exclusively on the cardinality and demand =
work.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Merry Christmas and happy holidays to you and your family!<o:p></o=
:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">With best regards,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">Ilya<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">On Fri, Dec 21, 2012 at 9:51 PM, Simon Peyton-Jones &lt;<a href=3D=
"mailto:simonpj at microsoft.com" target=3D"_blank">simonpj at microsoft.com</a>&=
gt; wrote:<o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">Ilya</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">I&#8217;ve found an example where cardinality will really help: CPS co=
de.</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">For example, deriving( Read ) generates code (in HEAD, soon) like this=
</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">expectP x (\v1 -&gt; expectP y (\v2 -&gt; expectP z (\v3 -&gt; ...)))<=
/span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">Then the full-laziness (float-out) pass tries to float out lets from t=
hose lambdas, because it thinks they may be called many times.
 But actually they are only called once ... they are continuations ... and =
the cardinality analysis will discover that I think.</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;margin-bottom:12.0p=
t"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">I=
 hope to get to this in the new year. What is the state of the cardinality =
branch?</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">I hope you are enjoying Madrid</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;;color:#888888">&nbsp;</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;;color:#888888">Simon</span><o:p></o:p></p>
</div>
</div>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</body>
</html>

--_000_59543203684B2244980D7E4057D5FBC1476BE3E6DB3EX14MBXC306e_--



More information about the ghc-devs mailing list