Re: #16401: Bad error message if we use TypeApplications with an identifier that doesn't exist
"GHC" <[email protected]> Thu, 07 Mar 2019 00:22:03 -0000
| Newsgroups | gmane.comp.lang.haskell.glasgow.bugs |
|---|---|
| Message-ID | <[email protected]> |
--===============7577636757900552410==
Content-Type: multipart/related;
boundary="===============4842355132982659837=="
--===============4842355132982659837==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
#16401: Bad error message if we use TypeApplications with an identifier that
doesn't exist
-------------------------------------+-------------------------------------
Reporter: Fuuzetsu | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Resolution: duplicate | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #13834 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => closed
* resolution: => duplicate
* related: => #13834
Comment:
Thanks for the bug report. This is "fixed" in GHC 8.8 in the sense that it
will at least report that `doesNotExist` is not in scope:
{{{
[1 of 1] Compiling BadError ( Bug.hs, interpreted )
Bug.hs:6:7: error: Variable not in scope: doesNotExist
|
6 | foo = doesNotExist @123
| ^^^^^^^^^^^^
Bug.hs:6:7: error:
• Cannot apply expression of type ‘t1’
to a visible type argument ‘123’
• In the expression: doesNotExist @123
In an equation for ‘foo’: foo = doesNotExist @123
|
6 | foo = doesNotExist @123
| ^^^^^^^^^^^^^^^^^
}}}
Of course, there's still the confusing "Cannot apply expression" part.
That has previously been reported as #13834, so to avoid ticket
duplication, I'll close this ticket in favor of that one.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16401#comment:1>