[GHC] #12023: Problems getting information and kind from GHC.Prim ~#, ~R#, ...

GHC ghc-devs at haskell.org
Fri Jun 8 00:08:53 UTC 2018


#12023: Problems getting information and kind from GHC.Prim ~#, ~R#, ...
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  GHCi              |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10059, #15209    |  Differential Rev(s):  Phab:D4801
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"5926b6ed0dcc86f8fd6038fdcc5e2ba2856f40ce/ghc"
 5926b6ed/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="5926b6ed0dcc86f8fd6038fdcc5e2ba2856f40ce"
 Don't expose (~#), (~R#), (~P#) from GHC.Prim

 Currently, the primitive `(~#)`, `(~R#)`, and `(~P#)` type
 constructors are wired in to be exported from `GHC.Prim`. This has
 some unfortunate consequences, however. It turns out that `(~#)` is
 actually a legal infix identifier, so users can make use of unboxed
 equalities in strange ways in user code (see #15209). The other two,
 `(~R#)` and `(~P#)`, can't be used in source code, but they can be
 observed with GHCi's `:browse` command, which is somewhat unnerving.

 The fix for both of these problems is simple: just don't wire them
 to be exported from `GHC.Prim`.

 Test Plan: make test TEST="T12023 T15209"

 Reviewers: bgamari, dfeuer

 Reviewed By: bgamari, dfeuer

 Subscribers: rwbarton, thomie, carter, dfeuer

 GHC Trac Issues: #12023, #15209

 Differential Revision: https://phabricator.haskell.org/D4801
 }}}

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


More information about the ghc-tickets mailing list