[GHC] #13859: Bad error message when compacting a Compact#

GHC ghc-devs at haskell.org
Wed Jun 21 18:12:24 UTC 2017


#13859: Bad error message when compacting a Compact#
-------------------------------------+-------------------------------------
           Reporter:  andrewthad     |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1-rc2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When I run this:

 {{{

 main :: IO ()
 main = do
   cpt@(Compact cpt# _ _) <- compact (55 :: Int)
   _ <- compactAdd cpt (MyCompact cpt#)
   return ()

 data MyCompact = MyCompact Compact#

 }}}

 I get this error message:

 {{{
 compaction failed: cannot compact mutable objects
 }}}

 This error message is misleading. I don't really know if it makes sense to
 allow a `Compact#` to be stored in a compact region, but if someone tries
 to do it, I would rather the error say:

 {{{
 cannot compact Compact# values
 }}}

 Or something like that.

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


More information about the ghc-tickets mailing list