[GHC] #10040: Add hint on typed-hole error message
GHC
ghc-devs at haskell.org
Wed Jan 28 13:54:20 UTC 2015
#10040: Add hint on typed-hole error message
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.4
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
If you write
{{{
f flag = _flag + 4
}}}
it's possible that you didn't intend a typed hole; you just mis-typed
`_flag`. So I propose to add hint to the error message saying that
{{{
Found hole ‘_flag’ with type: t
Where: ...blah blah...
Or perhaps ‘_flag’ is mis-spelled, or not in scope
Relevant bindings include it :: t (bound at <interactive>:9:1)
}}}
The third line is the new one.
See [https://www.haskell.org/pipermail/glasgow-haskell-
users/2015-January/025599.html this email trail].
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10040>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list