[GHC] #15871: Revamp -fprint-explicit-kinds
GHC
ghc-devs at haskell.org
Thu Nov 22 18:47:52 UTC 2018
#15871: Revamp -fprint-explicit-kinds
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: task | Status: patch
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.6.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5314
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"f5d2083807a03c57f194fcc3a7baf82e34aad524/ghc" f5d2083/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="f5d2083807a03c57f194fcc3a7baf82e34aad524"
Overhaul -fprint-explicit-kinds to use VKA
This patch changes the behavior of `-fprint-explicit-kinds`
so that it displays kind argument using visible kind application.
In other words, the flag now:
1. Prints instantiations of specified variables with `@(...)`.
2. Prints instantiations of inferred variables with `@{...}`.
In addition, this patch removes the `Use -fprint-explicit-kinds to
see the kind arguments` error message that often arises when a type
mismatch occurs due to different kinds. Instead, whenever there is a
kind mismatch, we now enable the `-fprint-explicit-kinds` flag
locally to help cue to the programmer where the error lies.
(See `Note [Kind arguments in error messages]` in `TcErrors`.)
As a result, these funny `@{...}` things can now appear to the user
even without turning on the `-fprint-explicit-kinds` flag explicitly,
so I took the liberty of documenting them in the users' guide.
Test Plan: ./validate
Reviewers: goldfire, simonpj, bgamari
Reviewed By: simonpj
Subscribers: rwbarton, carter
GHC Trac Issues: #15871
Differential Revision: https://phabricator.haskell.org/D5314
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15871#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list