Commit 893dc0e4 authored by ross's avatar ross

[project @ 2004-11-10 18:30:54 by ross]

replace IOExts with hierarchical modules, and track changes in System.IO
parent 87dc431f
module Main(main) where
import IO
import IOExts
import System.IO
import Char
main = do
......
......@@ -2,7 +2,7 @@ False
MODULE MAIN(MAIN) WHERE
IMPORT IO
IMPORT IOEXTS
IMPORT SYSTEM.IO
IMPORT CHAR
MAIN = DO
......
import IO
import IOExts
import System.IO
import Foreign
import CForeign
main = do
h <- openFile "hGetBuf001.hs" ReadMode
h <- openBinaryFile "hGetBuf001.hs" ReadMode
let sz = 42
loop = do
......
import IO
import IOExts
import System.IO
import Foreign
import CForeign
main = do
h <- openFile "hGetBuf001.hs" ReadMode
h <- openBinaryFile "hGetBuf001.hs" ReadMode
let sz = 42
loop = do
......
import IO
import IOExts
import System.IO
import Foreign
import CForeign
main = withCStringLen "hello world\n" $ \(ptr,len) -> hPutBuf stdout ptr len
main = do
hSetBinaryMode stdout True
withCStringLen "hello world\n" $ \(ptr,len) -> hPutBuf stdout ptr len
import IO
import IOExts
import System.IO
import Foreign
import CForeign
-- !!! this test failed to write anything in GHC 5.00.2
main = do
h <- openFile "hPutBuf002.out" ReadWriteMode
h <- openBinaryFile "hPutBuf002.out" ReadWriteMode
withCStringLen "hello world\n" $ \(ptr,len) -> hPutBuf h ptr len
hFileSize h >>= print
......@@ -2,7 +2,7 @@
module Main(main) where
import IO
import IOExts
import System.IO
getPosnAndPrint h = do
x <- hTell h
......@@ -44,7 +44,7 @@ main = do
putStrLn ""
hClose h
putStrLn ""
h <- openFileEx file (BinaryMode ReadMode)
h <- openBinaryFile file ReadMode
recordDoAndRepos h $
recordDoAndRepos h $
recordDoAndRepos h $
......
......@@ -43,8 +43,8 @@ At position: 2, found: ' '
At position: 3, found: '!'
At position: 4, found: '!'
At position: 1580, found: 'n'
At position: 1581, found: ' '
At position: 1582, found: '"'
At position: 1583, found: '"'
At position: 1584, found: '\n'
At position: 1574, found: 'n'
At position: 1575, found: ' '
At position: 1576, found: '"'
At position: 1577, found: '"'
At position: 1578, found: '\n'
......@@ -2,7 +2,7 @@
module Main(main) where
import IO
import IOExts
import System.IO
import Directory
main :: IO ()
......
-- !!! test IOExts.performGC
-- !!! test System.Mem.performGC
import IOExts
import System.Mem
main = performGC
import IO
import IOExts
import System.IO
import Debug.Trace
main = do
hPutStr stderr
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment