<div dir="ltr"><div><div><b>Background</b><br><br></div>A few months ago I added -fexternal-interpreter to GHC: <br><ul><li>docs: <a href="http://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#ghc-flag--fexternal-interpreter">http://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#ghc-flag--fexternal-interpreter</a></li><li>wiki, rationale: <a href="https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi">https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi</a></li></ul></div><div>When -fexternal-interpreter is used, GHC runs interpreted code in a separate subprocess, and communicates with it using binary messages over a pipe.<br><br></div><div>-fexternal-interpreter currently implements all of TH, quasi-quoting, annotations, and all the GHCi features except for some features of the debugger.  It is also now implemented on Windows, thanks to Tamar Christina.<br><br></div><div><b>Proposal</b><br><br></div><div>I'd like to propose that going forward we commit to maintaining full support for -fexternal-interpreter, with a view to making it the default.<br><br></div><div>Why?<br></div><ul><li>-fexternal-interpreter will be a prerequisite for GHCJS support, so maintaining full support for TH in -fexternal-interpreter will ensure that everything that works with GHC works with GHCJS.</li><li>We will be able to make simplifications in GHC and the build system once -fexternal-interpreter is the default, because when compiling with -prof or -dynamic we won't have to compile things twice any more.</li><li>Ultimately we don't want to have two ways of doing everything, because that's harder to maintain.<br></li></ul><div>How?<br></div><div><ul><li>I'll make all the TH and quasi-quoting tests run with and without -fexternal-interpreter, so it will break validate if one of these fails.</li></ul><p><b>Why now?</b></p><p>There are some TH changes in the pipeline that will need special attention to work with -fexternal-interpreter.  e.g. <a href="https://phabricator.haskell.org/D2286">https://phabricator.haskell.org/D2286</a> and <a href="https://ghc.haskell.org/trac/ghc/wiki/TemplateHaskell/Introspective">https://ghc.haskell.org/trac/ghc/wiki/TemplateHaskell/Introspective</a>, so I'd like to raise it now so we can keep the issue in mind.</p><p><br></p><p>Cheers</p><p>Simon<br></p></div></div>