Disable `-fdefer-out-of-scope-variables` in ghci.
ClosedPublic

Authored by sighingnow on Jun 11 2018, 9:26 AM.

Details

Summary

We have already disabled -fdefer-type-errors and -fdefer-typed-holes in ghci.
This patch disables -fdefer-out-of-scope-variables as well.

Fixes Trac Trac #15259, as well as Trac #14963.

Test Plan

make test TEST="T15259 T14963a T14963b T14963c"

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sighingnow created this revision.Jun 11 2018, 9:26 AM
sighingnow updated this revision to Diff 16851.Jun 12 2018, 6:45 AM
  • This patch also fixes Trac #14963. Add several tests for this ticket.
sighingnow edited the summary of this revision. (Show Details)Jun 12 2018, 6:46 AM
sighingnow edited the test plan for this revision. (Show Details)
sighingnow updated the Trac tickets for this revision.
tdammers requested changes to this revision.Jun 12 2018, 10:03 AM
tdammers added a subscriber: tdammers.

This solves the same problem as D4833, but seems like a more elegant solution, so I suggest we roll with this patch instead of mine.

One request though; it was not obvious to me that GHCi would end up in ​tcUserStmt, so it would be a good idea IMO to add some hints to ghc/GHCi/UI.hs to this extent. And maybe also amend the comment tcUserStmt (see inline comment).

compiler/typecheck/TcRnDriver.hs
2063–2064

Maybe amend this comment here with hints at the relevant tickets? GHCi now doesn't just emit redundant warnings if you keep the -defer options on, it actually panics. I think there should be a Note to this extent.

This revision now requires changes to proceed.Jun 12 2018, 10:03 AM
  • Add Note [Deferred type errors in GHCi].
  • Fix typos.
sighingnow marked an inline comment as done.Jun 12 2018, 11:42 AM
tdammers accepted this revision.Jun 13 2018, 2:03 AM

Fantastic, thanks a lot.

This revision is now accepted and ready to land.Jun 13 2018, 2:03 AM
This revision was automatically updated to reflect the committed changes.