[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / misc / examples / io / io014 / Main.hs
diff --git a/ghc/misc/examples/io/io014/Main.hs b/ghc/misc/examples/io/io014/Main.hs
new file mode 100644 (file)
index 0000000..23f62ca
--- /dev/null
@@ -0,0 +1,22 @@
+main = 
+    accumulate (map hIsOpen [stdin, stdout, stderr]) >>= \ opens ->
+    putText opens >>
+    putChar '\n' >>
+    accumulate (map hIsClosed [stdin, stdout, stderr]) >>= \ closeds ->
+    putText closeds >>
+    putChar '\n' >>
+    accumulate (map hIsReadable [stdin, stdout, stderr]) >>= \ readables ->
+    putText readables >>
+    putChar '\n' >>
+    accumulate (map hIsWritable [stdin, stdout, stderr]) >>= \ writables ->
+    putText writables >>
+    putChar '\n' >>
+    accumulate (map hIsBlockBuffered [stdin, stdout, stderr]) >>= \ buffereds ->
+    putText buffereds >>
+    putChar '\n' >>
+    accumulate (map hIsLineBuffered [stdin, stdout, stderr]) >>= \ buffereds ->
+    putText buffereds >>
+    putChar '\n' >>
+    accumulate (map hIsNotBuffered [stdin, stdout, stderr]) >>= \ buffereds ->
+    putText buffereds >>
+    putChar '\n'