[GHC] #14761: Incorrect diagnostic for UNPACK/missing strictness

GHC ghc-devs at haskell.org
Mon Feb 5 14:19:24 UTC 2018


#14761: Incorrect diagnostic for UNPACK/missing strictness
-------------------------------------+-------------------------------------
        Reporter:  dminuoso          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #7210             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dminuoso):

 The problem only seems to trigger when there's a type constructor.
 {{{#!hs
 data A = A { a :: {-# UNPACK #-} Maybe Int}     -- Wrong diagnostic
 data A = A { a :: {-# UNPACK #-} (,) Int Int }  -- Wrong diagnostic
 }}}

 But not with the special type syntax or unary types
 {{{#!hs
 data A = A { a :: {-# UNPACK #-} (Int, Int) } -- Works
 data A = A { a :: {-# UNPACK #-} Int }        -- Works
 }}}

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


More information about the ghc-tickets mailing list