[GHC] #16293: Inconsistencies and oddities of Proxy#

GHC ghc-devs at haskell.org
Mon Mar 4 18:51:01 UTC 2019


#16293: Inconsistencies and oddities of Proxy#
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.10.1
       Component:  Compiler          |              Version:  8.6.3
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  primops/should_compile/T16293a,
                                     |  th/T16293b
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |  https://gitlab.haskell.org/ghc/ghc/merge_requests/334
-------------------------------------+-------------------------------------

Comment (by Marge Bot <ben+marge-bot@…>):

 In [changeset:"012257c15f584069500af2953ab70856f9a1470e/ghc" 012257c/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="012257c15f584069500af2953ab70856f9a1470e"
 Fix #16293 by cleaning up Proxy# infelicities

 This bug fixes three problems related to `Proxy#`/`proxy#`:

 1. Reifying it with TH claims that the `Proxy#` type constructor has
    two arguments, but that ought to be one for consistency with
    TH's treatment for other primitive type constructors like `(->)`.
    This was fixed by just returning the number of
    `tyConVisibleTyVars` instead of using `tyConArity` (which includes
    invisible arguments).
 2. The role of `Proxy#`'s visible argument was hard-coded as nominal.
    Easily fixed by changing it to phantom.
 3. The visibility of `proxy#`'s kind argument was specified, which
    is different from the `Proxy` constructor (which treats it as
    inferred). Some minor refactoring in `proxyHashId` fixed ths up.

    Along the way, I had to introduce a `mkSpecForAllTy` function, so
    I did some related Haddock cleanup in `Type`, where that function
    lives.
 }}}

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


More information about the ghc-tickets mailing list