Last active
August 29, 2015 14:20
-
-
Save ion1/aaa5d1a840ed4f8dc4c0 to your computer and use it in GitHub Desktop.
addFinalizer (1 :: Integer)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % ghc --version | |
| The Glorious Glasgow Haskell Compilation System, version 7.10.1 | |
| % ghc -ignore-dot-ghci -e 'let f x = System.Mem.Weak.addFinalizer x (putStrLn ("bye " ++ show x)) in mapM_ f [-10..10 :: Integer] *> System.Mem.performGC *> Control.Concurrent.threadDelay 1000000' | |
| bye 10 | |
| bye 9 | |
| bye 8 | |
| bye 7 | |
| bye 6 | |
| bye 5 | |
| bye 4 | |
| bye 3 | |
| bye 2 | |
| bye 0 | |
| bye -1 | |
| bye -2 | |
| bye -3 | |
| bye -4 | |
| bye -5 | |
| bye -6 | |
| bye -7 | |
| bye -8 | |
| bye -9 | |
| bye -10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment