X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Ftests%2Fio%2Fstable001%2FMain.hs;fp=ghc%2Ftests%2Fio%2Fstable001%2FMain.hs;h=0000000000000000000000000000000000000000;hb=136e0eeecfc5b1d6574d38977a1e52f106c442f7;hp=d0cb98275fbeea9b7e285bc2a42b03064c251311;hpb=6184716f349ee978d684c6d09b4091d43ef8422f;p=ghc-hetmet.git diff --git a/ghc/tests/io/stable001/Main.hs b/ghc/tests/io/stable001/Main.hs deleted file mode 100644 index d0cb982..0000000 --- a/ghc/tests/io/stable001/Main.hs +++ /dev/null @@ -1,26 +0,0 @@ --- This is a rather exciting experiment in using the new call --- makeStablePtr# and performIO. It doesn't do much but it took an --- incredible effort to get it to do it. - -import Stable -import GlaExts -import CString - --- module Main(main) where - -main = makeStablePtr test >>= \ stablePtr -> - ((_casm_GC_ ``SaveAllStgRegs(); test1(%0); RestoreAllStgRegs();'' stablePtr) - :: PrimIO ()) - >>= \ _ -> - return () - -test :: IO Int -test = - let f x = sum [1..x] - f :: Int -> Int - in - _ccall_ printf - (packString "The stable pointer has just been used to print this number %d\n") (f 100) - >>= \ _ -> - return 5 -