[GHC] #12029: Notify user to import * from Data.Kind with TypeInType on

GHC ghc-devs at haskell.org
Sat Aug 6 02:11:54 UTC 2016


#12029: Notify user to import * from Data.Kind with TypeInType on
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  lowest            |            Milestone:
       Component:  GHCi              |              Version:  8.1
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Thanks, John, for looking into this.

 * `*` is not (yet) deprecated. While I did work with the larger community
 to come up with the name `Type`, I don't recall getting specific support
 for deprecating `*`. I do think this is a good direction of travel, but I
 don't think we should do this without more of a community mandate.

 * There are no kind synonyms in GHC 7.10 or below. Thus, according to the
 [https://prime.haskell.org/wiki/Libraries/3-Release-Policy three-release
 policy] (which isn't a formal operating policy of GHC, I don't think) we
 should wait until 8.4 before starting to deprecate `*`.

 * If the community agrees on moving away from `*`, we could add warnings
 about `*` to `-Wcompat`.

 * If the community agrees on moving away from `*`, we could also start
 changing the pretty-printer to use `Type` instead of `*`. This is not to
 be done lightly, however. There are several issues here:
    - Blogs, textbooks, etc., have used `*` for a long time. Furthermore,
 kinds are hard for newcomers to understand. Changing GHC's output will
 make this harder.
    - Until 8.4 comes out, it will be hard for a library author to discover
 that `*` is the right way to spell `Type` that is compatible with three
 releases.
    - The use of `*` as a kind is enshrined in the Haskell Reports. These
 Reports do not specify the error/warning behavior of a compiler, and so
 this change is not exactly a deviation from a standard. But it continues
 to make GHC seem as if it's drifting away from the standard with little
 remorse.

 * I personally think we should wait at least 5-6 years before formally
 disposing of `*`.

 * `-fprint-unicode-syntax` should use the unicode star for as long as we
 use `*` in regular output. This should be regardless of context.

 * I like the `NB`. It's for naive users as John suggests. But it also
 frequently reminds ''me'' to import `Data.Kind`. Frankly, that's why I
 added it! Please keep it for several releases. See note about blog posts
 and textbooks, above.

 * `*` and the unicode star are just ordinary importable symbols with
 `-XTypeInType`. Nothing more, nothing less. There is no compiler-aware
 relationship between the two, other than the fact that both are synonyms
 for `Type`.

 * Iceland Jack: You started this ticket. Did you come by the reported
 infelicity (confusing behavior from `:i *`) "honestly"? By this, I mean
 were you actually confused by GHC's behavior such that you needed
 different output to make you not confused? Or did you just notice an
 inconsistency which is, well, infelicitous? I ask because the treatment of
 `*` in GHC 8 is very much a dirty hack. I think fixing this bug will make
 it dirtier. If GHC is truly being confusing, then perhaps this is worth
 it. But I'm not convinced that fixing this is worth it if we're just doing
 it for the sake of consistency. (Note: I'm not arguing that the current
 behavior is the best possible behavior!)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12029#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list