[GHC] #15714: Compacting StaticPtr of a function doesn't work

GHC ghc-devs at haskell.org
Sat Oct 6 19:34:29 UTC 2018


#15714: Compacting StaticPtr of a function doesn't work
-------------------------------------+-------------------------------------
           Reporter:  osa1           |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.4.3
           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:
-------------------------------------+-------------------------------------
 I think we should be able to compact a StaticPtr of a function, but it
 currently doesn't work. Reproducer:

 {{{#!haskell
 {-# LANGUAGE StaticPointers #-}

 import GHC.StaticPtr
 import Data.Compact

 foo :: Int -> Int
 foo x = x^2

 main = do
     c <- compact (static foo :: StaticPtr (Int -> Int))
     return ()
 }}}

 Output:

 {{{
 ./compact_test
 compact_test: compaction failed: cannot compact functions
 }}}

 Tried with 8.4.3 (compact on hackage doesn't build with 8.6).

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


More information about the ghc-tickets mailing list