[GHC] #10867: Primop types should not mention ()

GHC ghc-devs at haskell.org
Fri Sep 25 10:46:38 UTC 2015


#10867: Primop types should not mention ()
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
                                     |  Phab:D1276, Phab:D1272
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * differential:   => Phab:D1276, Phab:D1272


Comment:

 Simon Marlow suggested that wrapping finalizers to peel off the return
 value from the returned unboxed tuple is unnecessary.
 fb4092642f057f258d07cd6979925f4e2579eda6 reverts changes the type from
 Simon PJ's suggestion of (implemented in Phab:D1271),
 {{{#!hs
 mkWeak# :: o -> b -> (State# RealWorld -> State# RealWorld)
         -> State# RealWorld -> (# State# RealWorld, Weak# b #)
 }}}
 to,
 {{{#!hs
 mkWeak# :: o -> b -> (State# RealWorld -> (# State# RealWorld, c #))
         -> State# RealWorld -> (# State# RealWorld, Weak# b #)
 }}}
 This was done in Phab:D1276. Note that the return type `c` is now fully
 polymorphic. It is the user's responsibility to ignore this value. This is
 explained in a comment.

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


More information about the ghc-tickets mailing list