<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Csaba,</p>
<p>Thanks for your interest. I'm not sure whether it would be better
to do a call sooner or later, but certainly want to get to this at
some point. Fendor and Sylvain (and occasionally I too) have been
chipping away at multiple home packages, which I hope could help
with these sorts of whole program things. I'm sort of thinking
milestones like:</p>
<p>1. Proper Int64 => Single sdist for GHC the library that is
truely target/configures-script-choice agnostic, but sdist
contains vendored generated code<br>
</p>
<p>2. Multiple home packages => Maybe easier to rig up what you
have with GHC's driver, though I suppose not needed for Hadrian
since it uses one-shot mode.</p>
<p>3. Extensible interface directory => Can better upstream your
work to save STG for later, needed for Hadrian / one-shot mode.<br>
</p>
<p>4. Matthew's proposal => can get whole program closure for
just for TH, pruning away runtime stuff.</p>
<p>5. Put it all together => single sdist that is much more
minimally processed, with TH instead of including generated code
(no vendoring or Setup.hs evils necessary). Easier to work on IDE
stuff with either sdist or fresh checkout of GHC.<br>
</p>
<p>So it's quite a while before GHC is ready to fully leverage your
work on the TH front, I think, but we could still talk through
things in advance of that if people are interested.<br>
</p>
<p>Also, included Sylvain Henry in the thread who's now back from
paternity leave,<br>
</p>
<p>John<br>
</p>
<div class="moz-cite-prefix">On 4/20/21 5:38 PM, Csaba Hruska wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANjChEr2_R5hog0fju+r0jC03hBZGXPNpY-NZ3cSZu4qycbcBw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>In theory the ext-stg interpereter could be used to run TH,
but it is not done yet.</div>
<div>I'm interested in optimization much much more, but I
deliberately designed the ext-stg ir/tooling to be simple and
easy to use and understand for others so that an average
Haskell programmer could implement his ideas or do his
experiment.</div>
<div>I'm also open for discussion about the possibilities. We
can have a video meeting about this if you'd like to.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Csaba<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Apr 12, 2021 at 7:57
PM John Ericson <a class="moz-txt-link-rfc2396E" href="mailto:john.ericson@obsidian.systems"><john.ericson@obsidian.systems></a> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Indeed it is!</p>
<p>I also am very much hoping this can be the missing piece
we need to allow Template Haskell to work with a stage 0
GHC, so that we can safely use TH in GHC itself even when
the ABI is changing. See <a
href="https://github.com/ghc-proposals/ghc-proposals/issues/162"
target="_blank" moz-do-not-send="true">https://github.com/ghc-proposals/ghc-proposals/issues/162</a>
for details, where I've also linked Csaba's blog post.
(And maybe also
<a
href="https://gitlab.haskell.org/ghc/ghc/-/wikis/cross-compilation/roadmap"
target="_blank" moz-do-not-send="true">https://gitlab.haskell.org/ghc/ghc/-/wikis/cross-compilation/roadmap</a>
for more background, and related things like <a
href="https://github.com/ghc-proposals/ghc-proposals/pull/412"
target="_blank" moz-do-not-send="true">https://github.com/ghc-proposals/ghc-proposals/pull/412</a>.)</p>
<p>TH could perhaps be used to replace some of the ad-hoc
code gen we have for e.g. RTS constants and primops. This
in turn would simplify the build system, allowing for
`cabal install ghc` to work without shipping generated
Haskell code in the sdist.<br>
</p>
<p>John<br>
</p>
<div>On 4/12/21 4:51 AM, Simon Peyton Jones via ghc-devs
wrote:<br>
</div>
<blockquote type="cite">
<div>
<p class="MsoNormal"><span>That’s extremely impressive,
Csaba.</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Maybe of interest to folk who
have been thinking about “fat interface files”.</span></p>
<p class="MsoNormal"><span><br>
Simon</span></p>
<p class="MsoNormal"><span> </span></p>
<div style="border-color:currentcolor currentcolor
currentcolor blue;border-style:none none none
solid;border-width:medium medium medium
1.5pt;padding:0cm 0cm 0cm 4pt">
<div>
<div style="border-color:rgb(225,225,225)
currentcolor currentcolor;border-style:solid none
none;border-width:1pt medium medium;padding:3pt
0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span
lang="EN-US"> ghc-devs <a
href="mailto:ghc-devs-bounces@haskell.org"
target="_blank" moz-do-not-send="true"><ghc-devs-bounces@haskell.org></a>
<b>On Behalf Of </b>Csaba Hruska<br>
<b>Sent:</b> 10 April 2021 11:49<br>
<b>To:</b> GHC developers <a
href="mailto:ghc-devs@haskell.org"
target="_blank" moz-do-not-send="true"><ghc-devs@haskell.org></a><br>
<b>Subject:</b> External STG Interpreter blog
post</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal"
style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">Hello,</p>
</div>
<div>
<p class="MsoNormal"
style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm"> </p>
</div>
<div>
<p class="MsoNormal"
style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">I've
written a blog post about GHC-WPC's external stg
interpreter.<br>
<a
href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fposts%2Fexternal-stg-49857800&data=04%7C01%7Csimonpj%40microsoft.com%7C1535f88608f549dabb8108d8fc0e4c3f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637536486264337310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=VXa%2FhDs1ePRS5NTu04buv42yj%2BFKw%2FJzBLQJSwp8qTs%3D&reserved=0"
target="_blank" moz-do-not-send="true">https://www.patreon.com/posts/external-stg-49857800</a></p>
</div>
<div>
<p class="MsoNormal"
style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">Feedback
is welcome.</p>
</div>
<div>
<p class="MsoNormal"
style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm"> </p>
</div>
<div>
<p class="MsoNormal"
style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">Cheers,</p>
</div>
<div>
<p class="MsoNormal"
style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">Csaba</p>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
ghc-devs mailing list
<a href="mailto:ghc-devs@haskell.org" target="_blank" moz-do-not-send="true">ghc-devs@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank" moz-do-not-send="true">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a>
</pre>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</body>
</html>