Fix External Core interpreter
[ghc-hetmet.git] / utils / ext-core / lib / GHC_ExtCore / Handle.hs
diff --git a/utils/ext-core/lib/GHC_ExtCore/Handle.hs b/utils/ext-core/lib/GHC_ExtCore/Handle.hs
new file mode 100644 (file)
index 0000000..6417c28
--- /dev/null
@@ -0,0 +1,19 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+-- Replacement for GHC.Handle module
+
+module GHC_ExtCore.Handle(Handle(..), stdin, stderr, stdout, hFlush) where
+
+import GHC.Exts
+
+newtype Handle = H Int
+
+-- these shouldn't actually get used
+stdout, stdin, stderr :: Handle
+stdin  = H 0
+stdout = H 1
+stderr = H 2
+
+-- ditto
+hFlush :: Handle -> IO ()
+hFlush _ = return ()