[GHC] #11130: GHCi should not defer typed holes
#11130: GHCi should not defer typed holes -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Incorrect Unknown/Multiple | warning at compile-time Test Case: | Blocked By: ghci/scripts/T10248 | Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- In the function `tcUserStmt` in compiler/typecheck/TcRnDriver.hs, before going over the different ways ('plans') to lift an expression typed at the prompt into the GHCi monad, `Opt_DeferTypeErrors` is disabled. Here is the accompanying comment: {{{ -- Ensure that type errors don't get deferred when type checking the -- naked expression. Deferring type errors here is unhelpful because the -- expression gets evaluated right away anyway. It also would potentially -- emit redundant type-error warnings, one from each plan. ; plan <- unsetGOptM Opt_DeferTypeErrors $ }}} Since `Opt_DeferTypeErrors` implies `Opt_DeferTypedHoles`, `Opt_DeferTypedHoles` should be disabled here as well. This will improve the error message for T10248. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11130> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11130: GHCi should not defer typed holes -------------------------------------+------------------------------------- Reporter: thomie | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | ghci/scripts/T10248 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * owner: => thomie -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11130#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11130: GHCi should not defer typed holes -------------------------------------+------------------------------------- Reporter: thomie | Owner: thomie Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | ghci/scripts/T10248 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1527 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => patch * differential: => Phab:D1527 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11130#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11130: GHCi should not defer typed holes -------------------------------------+------------------------------------- Reporter: thomie | Owner: thomie Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | ghci/scripts/T10248 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1527 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"71c0cc1531c3e548e47f435432ed31cb79512607/ghc" 71c0cc15/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="71c0cc1531c3e548e47f435432ed31cb79512607" GHCi should not defer typed holes In the function `tcUserStmt` in compiler/typecheck/TcRnDriver.hs, before going over the different ways ('plans') to lift an expression typed at the prompt into the GHCi monad, `Opt_DeferTypeErrors` is disabled. Here is the accompanying comment: ``` -- Ensure that type errors don't get deferred when type checking the -- naked expression. Deferring type errors here is unhelpful because the -- expression gets evaluated right away anyway. It also would potentially -- emit redundant type-error warnings, one from each plan. ; plan <- unsetGOptM Opt_DeferTypeErrors $ ``` Since `Opt_DeferTypeErrors` implies `Opt_DeferTypedHoles`, `Opt_DeferTypedHoles` should be disabled here as well. This improves the error message for T10248 (it doesn't mention ghciStepIO anymore). This is a partial fix for #10249, and a complete fix for #11130. Depends on D1526 Reviewers: simonpj, austin, bgamari Reviewed By: simonpj Subscribers: simonpj Differential Revision: https://phabricator.haskell.org/D1527 GHC Trac Issues: #10249, #11130 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11130#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11130: GHCi should not defer typed holes -------------------------------------+------------------------------------- Reporter: thomie | Owner: thomie Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | ghci/scripts/T10248 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1527 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11130#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC