[GHC] #16141: StrictData and TypeFamilies regression

GHC ghc-devs at haskell.org
Mon Jan 7 17:26:24 UTC 2019


#16141: StrictData and TypeFamilies regression
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.8.1
       Component:  Compiler (Type    |              Version:  8.6.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 The mention of `Int#` has me wondering: is GHC trying to unpack the `Int`
 field of `MkT`? If so, I would surely think that that's incorrect, since
 the idea of unpacking a newtype seems bogus, especially since GHC rejects
 this program:

 {{{
 λ> newtype T = MkT {-# UNPACK #-} !Int

 <interactive>:1:13: error:
     • A newtype constructor cannot have a strictness annotation,
         but ‘MkT’ does
     • In the definition of data constructor ‘MkT’
       In the newtype declaration for ‘T’
 }}}

 Perhaps the implementation of `StrictData` misses this fact, however. I'll
 check the code to see if that is the case.

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


More information about the ghc-tickets mailing list