[GHC] #10569: Treat an out-of-scope variable like a typed hole

GHC ghc-devs at haskell.org
Wed Jun 24 22:18:06 UTC 2015


#10569: Treat an out-of-scope variable like a typed hole
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.10.1
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 If we have
 {{{
 f x = x + y
 }}}
 GHC currently reports `Not in scope: y`, and halts. It would be cool to
 treat `y` as a typed hole, so that
  * The out-of-scope message would give its type
  * Using `-fdefer-type-errors` we could defer the error to runtime.

 This was suggested in #5910
 [https://ghc.haskell.org/trac/ghc/ticket/5910#comment:19 comment 19], and
 [http://haskell.1045720.n5.nabble.com/fdefer-more-errors-td5809991.html
 this Haskell Cafe thread]

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10569>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list