[GHC] #12550: Inconsistent unicode display for kinds
GHC
ghc-devs at haskell.org
Sun Dec 11 23:04:12 UTC 2016
#12550: Inconsistent unicode display for kinds
---------------------------------+--------------------------------------
Reporter: johnleo | Owner: johnleo
Type: bug | Status: new
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: MacOS X | Architecture: x86_64 (amd64)
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
---------------------------------+--------------------------------------
Comment (by johnleo):
Ben's fix for #11660 handled almost all of the problems. The sole
remaining problem was the result of conflation between the input format of
kind * (`*`, `★` or `Type`), the internal representation, and the output
format. If * was inferred it was output correctly, but if it was
explicitly specified in the type signature it would be output in that
form, which means the output format could be a confusing mixture of `*`,
`★` and `Type`. I have unified the output format to be `*` when non-
unicode output is expected and `★` when `-fprint-unicode-syntax` is
enabled. Note that in the future we may output `Type` in all cases
instead (see #12030) but this will not happen for some time; I plan to
create a proposal for this.
I wanted to go further and unify the internal representations of `*`, `★`
and `Type` by setting the key of all three to be `liftedTypeKindTyConKey`
since internally they are all fundamentally the same thing. However this
caused a panic in `PrelInfo.knownKeyNamesOkay` since apparently all keys
have to be unique. I wonder if that condition could be relaxed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12550#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list