• Ryan Scott's avatar
    Don't expose (~#), (~R#), (~P#) from GHC.Prim · 5926b6ed
    Ryan Scott authored
    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
    5926b6ed
all.T 5.42 KB