inCompact and isCompact don't seem to work
inCompact and isCompact always seem to return False
inCompact is supposed to indicate whether a certain value is in a
isCompact is supposed to indicate whether a
certain value is in any compact region. I have not been able to
convince either of these to return
True under any circumstances.
Steps to reproduce
import Data.Compact import Control.Exception (evaluate) import Control.DeepSeq import System.Mem main = do p <- evaluate $ force [1..10000 :: Integer] foo <- compact p performMajorGC -- Even this doesn't do the trick. isCompact p >>= print inCompact foo p >>= print print . sum $ getCompact foo
False twice before successfully summing and printing the contents of
Optimization level makes no difference.
I expect this to print
True twice. Even if
isCompact is too hard to implement, I would at least expect
inCompact to work.
- GHC version used: 8.10.1
- Operating System:
- System Architecture: