Skip to content

Instantly share code, notes, and snippets.

@master-q
Created June 4, 2013 19:09
Show Gist options
  • Save master-q/5708605 to your computer and use it in GitHub Desktop.
Save master-q/5708605 to your computer and use it in GitHub Desktop.
AjhcさんdeRefStablePtrでIOを戻すと実行できない。。。
import Foreign.StablePtr
main :: IO ()
main = do
p <- newStablePtr $ print "hoge"
d <- deRefStablePtr p
d
@master-q
Copy link
Author

master-q commented Jun 4, 2013

$ ghc Test.hs
Linking Test ...
casper$ ./Test
"hoge"
$ echo orz
orz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment