[GHC] #12003: Improve error message about closed variables
GHC
ghc-devs at haskell.org
Mon May 2 19:18:50 UTC 2016
#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
More information about the ghc-tickets
mailing list