[GHC] #14722: Error message points to wrong location
GHC
ghc-devs at haskell.org
Mon Jan 29 17:45:52 UTC 2018
#14722: Error message points to wrong location
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.5
Resolution: | Keywords:
| TypeApplications
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by simonpj):
* keywords: => TypeApplications
Comment:
You're right. This is a consequence of the fact that (currently) GHC
reports visible-type-application errors "eagerly", as soon as it
encounters them, discarding all pending errors. In this case the error
you want reported will be pending (in the constraints being gathered) but
it never gets a chance to be reported.
Richard: it'd be good to find a way to defer the visible-type-application
error. But we don't have a way to do that yet. A `HoleCan` isn't right.
A constraint `[W] () ~ forall a. ???` doesn't seem right because we have
nothing to put for the `??`. I suppose we could invent a new kind of
deferred error constraint, perhaps generalising `HoleCan`.
See [wiki:TypeApplication] for a list of other VTA-related tickets; I have
not checked but I bet that some are like this one.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14722#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list