Re: Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Conal Elliott
I think I found an answer: invoke parseStaticFlags, passing in the flags specified as if on the ghc command line. For instance: parseStaticFlags $ noLoc <$> ["-dsuppress-uniques", "-dsuppress-type-application

Re: Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Johan Tibell
On Wed, May 1, 2013 at 2:13 PM, Conal Elliott wrote: > 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 o

Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Conal Elliott
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