Here [1] is the tweak we do in HaRe to get the right dynflags
Alan
[1]
https://github.com/alanz/HaRe/blob/master/src/Language/Haskell/Refact/Utils/Utils.hs#L224
On 3 Feb 2017 5:59 p.m., "Matthew Pickering"
wrote:
> You are right. I looked more closely now and it looks like
> "parseModule" and
You are right. I looked more closely now and it looks like
"parseModule" and so on overwrite the DynFlags with a cached version
before running the relevant piece of the pipeline.
857hsc_env <- getSession
858let hsc_env_tmp = hsc_env { hsc_dflags = ms_hspp_opts ms }
859hpm <- liftIO
On Fri, Feb 03, 2017 at 12:21:38PM +, Christopher Done wrote:
> I tried the following before calling getModInfo, expecting there to be
> no output anymore:
>
> + GHC.setSessionDynFlags
> +df {log_action = \ref dflags severity srcSpan style msg -> return ()}
That is pretty much ex
Adding `handleSourceError` around it makes no difference.
Which makes sense, as I don't think warnings count as exceptions,
otherwise my code would never have completed in the first place.
On 3 February 2017 at 12:50, Matthew Pickering
wrote:
> The errors are eventually caught and printed by "ha
The errors are eventually caught and printed by "handleSourceError"
which is used a few times in your code. You could either modify one of
these to not print out any errors or try something more intelligent
like is in `parUpsweep_one` which does use the `log_action` in order
to print the errors out