summaryrefslogtreecommitdiff
path: root/ghc/compiler/ilxGen/tests/yes2.hs
diff options
context:
space:
mode:
authorrrt <unknown>2001-02-26 15:44:59 +0000
committerrrt <unknown>2001-02-26 15:44:59 +0000
commit81027250abf0099f1dbaef1ddb8534547268ad41 (patch)
tree6f5c60f1fe1d6e7c7e867a31256d604e788e6df4 /ghc/compiler/ilxGen/tests/yes2.hs
parent44637383d831bd3ca8f3aa3cf80e6a0c90986b41 (diff)
downloadhaskell-81027250abf0099f1dbaef1ddb8534547268ad41.tar.gz
[project @ 2001-02-26 15:44:59 by rrt]
ILX back-end. WARNING: this is code copied in that was previously added to 4.06. It's not remotely sane to try to compile it at the moment; that's what I've got to do next. Don't worry, it's all #ifdefed at the moment.
Diffstat (limited to 'ghc/compiler/ilxGen/tests/yes2.hs')
-rw-r--r--ghc/compiler/ilxGen/tests/yes2.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/ghc/compiler/ilxGen/tests/yes2.hs b/ghc/compiler/ilxGen/tests/yes2.hs
new file mode 100644
index 0000000000..7fa20c5b7d
--- /dev/null
+++ b/ghc/compiler/ilxGen/tests/yes2.hs
@@ -0,0 +1,18 @@
+
+import PrelIOBase
+foreign import "ilxHello" unsafe ilxHello :: IO ()
+
+
+
+seqIO :: IO () -> IO () -> IO ()
+seqIO (IO m) (IO k) = IO ( \ s ->
+ case m s of
+ (# new_s, a #) -> k new_s
+ )
+
+
+yes () = seqIO ilxHello (yes ())
+
+main :: IO ()
+main = yes ()
+