<div dir="ltr"><div><div>I think I found an answer: invoke <a href="http://www.haskell.org/ghc/docs/7.4.1/html/libraries/ghc/GHC.html#v:parseStaticFlags" target="_blank">parseStaticFlags</a>, passing in the flags specified as if on the ghc command line. For instance:<br>
<br> parseStaticFlags $ noLoc <$> ["-dsuppress-uniques", "-dsuppress-type-applications", "-dsuppress-idinfo"]<br><br></div>This call must be made before a compilation gets made. I'm (now) doing it before calling runGhc for the first time.<br>
<br></div><div>Johan: I'm working toward making a GHC back-end that maps from Core to a programmable logic architecture (similar to FPGA).<br></div><div>
<br></div>-- Conal<br><div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 1, 2013 at 3:59 PM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On Wed, May 1, 2013 at 2:13 PM, Conal Elliott <span dir="ltr"><<a href="mailto:conal@conal.net" target="_blank">conal@conal.net</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>I'm using the GHC API to compile Haskell source code to Core. I'd like to pretty-print the result with the sort of simplifications I get with -dsuppress-type-applications, -dsuppress-uniques, etc (used in combination with -ddump-simpl on ghc's command line). How can I set these options via the GHC API? Has the answer changed since 7.4.1 (which I'm currently using)?<br>
</div></div></blockquote><div><br></div></div><div>I'd also be interested in the answer and whatever you're working on Conal. I spend more time looking at core than I like and anything that can made that time more efficient would be great.</div>
<div> </div></div></div></div>
</blockquote></div><br></div></div>