<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>The primitive is `touch#`
(<a class="moz-txt-link-freetext" href="https://www.stackage.org/haddock/lts-15.12/base-4.13.0.0/GHC-Exts.html#v:touch-35">https://www.stackage.org/haddock/lts-15.12/base-4.13.0.0/GHC-Exts.html#v:touch-35</a>-)</p>
<p>It's quite fragile (e.g. can be optimized away or moved), so
we're trying to replace it with something else. See
<a class="moz-txt-link-freetext" href="https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/with-combinator">https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/with-combinator</a>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 13/05/2020 09:03, YueCompl via
Haskell-Cafe wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3ABE5D7E-58E6-45FB-AB5A-97D00FC9062D@icloud.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Thanks! I found `touch` in `Control.Monad.Primitive` , and repa
even requires an array element type to implement `Elt` which
mainly asking for the `touch` method.
<div class=""><br class="">
</div>
<div class="">It's interesting to know there's even more
improvement on it.</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 2020-05-13, at 14:52, David Feuer <<a
href="mailto:david.feuer@gmail.com" class=""
moz-do-not-send="true">david.feuer@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="auto" class="">You're looking for the `touch`
function. I don't remember where it lives. I believe
there's also a new and improved replacement whose name I
don't remember.</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, May 13, 2020,
2:47 AM YueCompl via Haskell-Cafe <<a
href="mailto:haskell-cafe@haskell.org" class=""
moz-do-not-send="true">haskell-cafe@haskell.org</a>>
wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Folks,<br
class="">
<br class="">
I need a little help, I remember I had read some where
that, there's a function to fake a use of a value, so
it won't be garbage collected too early, as GHC has an
optimization to forget a value as early as possible.
But I can't remember the function name or even the
keyword to google it out, hint me please!<br class="">
<br class="">
Best regards,<br class="">
Compl<br class="">
<br class="">
_______________________________________________<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"
rel="noreferrer noreferrer" target="_blank" class=""
moz-do-not-send="true">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br
class="">
Only members subscribed via the mailman list are
allowed to post.</blockquote>
</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="" moz-do-not-send="true">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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
</body>
</html>