<div dir="ltr">Nevermind. The docs for compactAdd say:<div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">> This will help you avoid copying when the value contains pointers into the compact region</span><br></div><div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">I had missed that.</span></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 10, 2017 at 9:43 PM, Andrew Martin <span dir="ltr"><<a href="mailto:andrew.thaddeus@gmail.com" target="_blank">andrew.thaddeus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In the paper on compact regions (<a href="http://ezyang.com/papers/ezyang15-cnf.pdf" rel="noreferrer" target="_blank">http://ezyang.com/papers/<wbr>ezyang15-cnf.pdf</a>),<br>
we find the following:<br>
<br>
> However, if we want to apply a functional update to this tree, we may<br>
> want to specify the already existing compact region so we can reuse any<br>
> already compacted shared data... appendCompact, like newCompact, fully<br>
> evaluates a; however, it copies the result into the same compact region<br>
> as Compact b. Additionally, it short-circuits the evaluation/copying<br>
> process if a subgraph is already in the target compact region.<br>
<br>
However, in the docs for both the compact library and the ghc-compact<br>
library (still only on phabricator), this short-circuiting behavior is<br>
not mentioned. Did this end up in the final implementation on was it<br>
dropped? If it is implemented, I think it's worth mentioning in the<br>
docs for `compactAdd`.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Andrew Martin<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">-Andrew Thaddeus Martin</div>
</div></div>