Skip to content

Introduce GhciMonad and generalize types of functions in GHCi.UI

Zejun Wu requested to merge watashi/ghc:arcpatch-D5433 into master

This moves accepted revision https://phabricator.haskell.org/D5433 to gitlab, check phabricator for details of past discussions.


Introduce GhciMonad, which is bascially GhcMonad + HasGhciState. Generalize the commands and help functions defined in GHCi.UI so they can be used as both GHCi a and InputT GHCi a.

The long term plan is to move reusable bits to ghci library and make it easier to build a customized interactive ui which carries customized state and provides customized commands.

Most changes are trivial in this diff by relaxing the type constraint or add/remove lift as necessary. The non-trivial changes are:

  • Change HasGhciState to GhciMonad and expose it.
  • Implementation of reifyGHCi.

Thank you for your contribution to GHC!

Please take a few moments to verify that your commits fulfill the following:

  • are either individually buildable or squashed
  • have commit messages which describe what they do (referring to Notes and tickets using #NNNN syntax when appropriate)
  • have added source comments describing your change. For larger changes you likely should add a Note and cross-reference it from the relevant places.
  • add a testcase to the testsuite.

If you have any questions don't hesitate to open your merge request and inquire in a comment. If your patch isn't quite done yet please do add prefix your MR title with WIP:.

Edited by Zejun Wu

Merge request reports