[GHC] #12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #10569 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- As a result of #10569, out of scope variables are turned into special type holes so that type information of the variable can be attached to the error message. However, this causes problems when used with `-fdefer-typed-holes` as scope errors have been turned into type errors and are now deferred when using this flag. Richard sums up the situation, "Even if someone is deferring type errors, I imagine most people don't want to defer scope errors". It would be good to add a flag which controls whether out of scope variables are also deferrable when used with existing deferral flags. Goal: Add a flag ` -fdefer-out-of-scope-variables` which controls whether out of scope variables are deferred when using `-fdefer-typed-holes`. It should be turned off by default. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * related: #10569 => #10569, #12156 Comment: Perhaps try to fix #12156 while you're in the neighborhood. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by shahn): * cc: shahn (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): #12406 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * related: #10569, #12156 => #10569, #12156, #12406 Comment: See #12406 for a test case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: ak3n Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): #12406 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by ak3n): * owner: => ak3n -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: ak3n Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): Phab:D2458 #12406 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by ak3n): * differential: => Phab:D2458 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: ak3n Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): Phab:D2458 #12406 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Personally I'm not sure it's worth having more flag, but I don't object provided it is well-documented. I've commented on the Phab patch too. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: ak3n Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): Phab:D2458 #12406 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by ertes): I'd be very grateful, if you could include the flag in 8.0.2, too. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: ak3n Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): Phab:D2458 #12406 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * type: bug => feature request -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with
-fdefer-typed-holes
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: ak3n
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #10569, #12156, | Differential Rev(s): Phab:D2458
#12406 |
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: ak3n Type: feature request | Status: merge Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): Phab:D2458 #12406 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => merge * milestone: => 8.0.2 Comment: Alright, we can include this in 8.0.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12170: Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes -------------------------------------+------------------------------------- Reporter: mpickering | Owner: ak3n Type: feature request | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569, #12156, | Differential Rev(s): Phab:D2458 #12406 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 661d140a198d941e3a1eaec13fbf7bd4406fa3e5. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12170#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC