Compacting StaticPtr of a function doesn't work
I think we should be able to compact a StaticPtr of a function, but it currently doesn't work. Reproducer:
{-# 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).
Trac metadata
Trac field | Value |
---|---|
Version | 8.4.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | bgamari, simonmar |
Operating system | |
Architecture |