Grand Plan for 8.0.2

Alan & Kim Zimmerman alan.zimm at
Thu Sep 8 07:19:52 UTC 2016

I imagine I have completely missed the boat on this one, but would like to
test the waters on including the following [1] patch

Add hook for creating ghci external interpreter

The external interpreter is launched by calling
'System.Process.createProcess' with a 'CreateProcess' parameter.

The current value for this has the 'std_in', 'std_out' and 'std_err'
fields use the default of 'Inherit', meaning that the remote interpreter
shares the stdio with the original ghc/ghci process.

This patch introduces a new hook to the DynFlags, which has an
opportunity to override the 'CreateProcess' fields, launch the process,
and retrieve the stdio handles actually used.

So if a ghci external interpreter session is launched from the GHC API
the stdio can be redirected if required, which is useful for tooling/IDE

It is not behaviour-changing unless the hook is actually used, but does
make a change to Hooks and hence DynFlags.

I think it can potentially make a lot more options available for IDE
tooling, and it would be great to have it available in GHC 8.0.x already.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list