Skip to content

Only exit ghci in -e mode when :add command fails

Claudio Bley requested to merge avdv/ghc:fix-ghci-add-dash-e-error into master

Hi,

I had a stab at fixing #24115 (closed).

Where is the key part of this patch? That is, what should reviewers look at first?

The issue was in ghc/GHCi/UI.hs where failIfExprEvalMode was just always called unconditionally.

Please take a few moments to address the following points:

  • if your MR may break existing programs (e.g. touches base or causes the compiler to reject programs), please describe the expected breakage and add the user-facing label. This will run ghc/head.hackage> to characterise the effect of your change on Hackage.
  • ensure that your commits are either individually buildable or squashed
  • ensure that your commit messages describe what they do (referring to 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.
  • updates the users guide if applicable
  • mentions new features in the release notes for the next release

Merge request reports