[GHC] #12003: Improve error message about closed variables

#12003: Improve error message about closed variables -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple StaticPointers | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #11656 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- After allowing local bindings in static definitions the following program {{{ {-# LANGUAGE StaticPointers #-} module M where f x = static g where g = h h = x }}} yields the error {{{ ../tmp/M.hs:4:7: error: • ‘g’ is used in a static form but it is not closed. • In the expression: static g In an equation for ‘f’: f x = static g where g = h h = x }}} Where it would be more helpful to get a message like {{{ ../tmp/M.hs:4:7: error: • ‘g’ is used in a static form but it is not closed because it uses ‘h’ which uses ‘x’ which is not let-bound. • In the expression: static g In an equation for ‘f’: f x = static g where g = h h = x }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12003 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12003: Improve error message about closed variables -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2167 Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * status: new => patch * differential: => Phab:D2167 @@ -23,1 +23,1 @@ - Where it would be more helpful to get a message like + where it would be more helpful to get a message like New description: After allowing local bindings in static definitions the following program {{{ {-# LANGUAGE StaticPointers #-} module M where f x = static g where g = h h = x }}} yields the error {{{ ../tmp/M.hs:4:7: error: • ‘g’ is used in a static form but it is not closed. • In the expression: static g In an equation for ‘f’: f x = static g where g = h h = x }}} where it would be more helpful to get a message like {{{ ../tmp/M.hs:4:7: error: • ‘g’ is used in a static form but it is not closed because it uses ‘h’ which uses ‘x’ which is not let-bound. • In the expression: static g In an equation for ‘f’: f x = static g where g = h h = x }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12003#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12003: Improve error message about closed variables -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2167 Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * cc: mboes (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12003#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12003: Improve error message about closed variables
-------------------------------------+-------------------------------------
Reporter: | Owner:
facundo.dominguez |
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Resolution: | Keywords:
| StaticPointers
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11656 | Differential Rev(s): Phab:D2167
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12003: Improve error message about closed variables -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: fixed | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2167 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12003#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC