diff options
author | simonmar <unknown> | 2002-02-12 15:17:36 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-02-12 15:17:36 +0000 |
commit | 2cc5b907318f97e19b28b2ad8ed9ff8c1f401dcc (patch) | |
tree | 2fefe09bc63464ac3a28ea37b61eefc5e506685a /ghc/lib/std/IO.lhs | |
parent | 239e9471e104fd88ec93bf42623c3a68a496657a (diff) | |
download | haskell-2cc5b907318f97e19b28b2ad8ed9ff8c1f401dcc.tar.gz |
[project @ 2002-02-12 15:17:13 by simonmar]
Switch over to the new hierarchical libraries
---------------------------------------------
This commit reorganises our libraries to use the new hierarchical
module namespace extension.
The basic story is this:
- fptools/libraries contains the new hierarchical libraries.
Everything in here is "clean", i.e. most deprecated stuff has
been removed.
- fptools/libraries/base is the new base package
(replacing "std") and contains roughly what was previously
in std, lang, and concurrent, minus deprecated stuff.
Things that are *not allowed* in libraries/base include:
Addr, ForeignObj, ByteArray, MutableByteArray,
_casm_, _ccall_, ``'', PrimIO
For ByteArrays and MutableByteArrays we use UArray and
STUArray/IOUArray respectively now.
Modules previously called PrelFoo are now under
fptools/libraries/GHC. eg. PrelBase is now GHC.Base.
- fptools/libraries/haskell98 provides the Haskell 98 std.
libraries (Char, IO, Numeric etc.) as a package. This
package is enabled by default.
- fptools/libraries/network is a rearranged version of
the existing net package (the old package net is still
available; see below).
- Other packages will migrate to fptools/libraries in
due course.
NB. you need to checkout fptools/libraries as well as
fptools/hslibs now. The nightly build scripts will need to be
tweaked.
- fptools/hslibs still contains (almost) the same stuff as before.
Where libraries have moved into the new hierarchy, the hslibs
version contains a "stub" that just re-exports the new version.
The idea is that code will gradually migrate from fptools/hslibs
into fptools/libraries as it gets cleaned up, and in a version or
two we can remove the old packages altogether.
- I've taken the opportunity to make some changes to the build
system, ripping out the old hslibs Makefile stuff from
mk/target.mk; the new package building Makefile code is in
mk/package.mk (auto-included from mk/target.mk).
The main improvement is that packages now register themselves at
make boot time using ghc-pkg, and the monolithic package.conf
in ghc/driver is gone.
I've updated the standard packages but haven't tested win32,
graphics, xlib, object-io, or OpenGL yet. The Makefiles in
these packages may need some further tweaks, and they'll need
pkg.conf.in files added.
- Unfortunately all this rearrangement meant I had to bump the
interface-file version and create a bunch of .hi-boot-6 files :-(
Diffstat (limited to 'ghc/lib/std/IO.lhs')
-rw-r--r-- | ghc/lib/std/IO.lhs | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/ghc/lib/std/IO.lhs b/ghc/lib/std/IO.lhs deleted file mode 100644 index d078d7babf..0000000000 --- a/ghc/lib/std/IO.lhs +++ /dev/null @@ -1,94 +0,0 @@ -% ----------------------------------------------------------------------------- -% $Id: IO.lhs,v 1.44 2001/06/09 07:06:05 qrczak Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[IO]{Module @IO@} - -Implementation of the standard Haskell IO interface, see -@http://haskell.org/onlinelibrary/io.html@ for the official -definition. - -\begin{code} -module IO ( - Handle, -- abstract, instance of: Eq, Show. - HandlePosn(..), -- abstract, instance of: Eq, Show. - - IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode), - BufferMode(NoBuffering,LineBuffering,BlockBuffering), - SeekMode(AbsoluteSeek,RelativeSeek,SeekFromEnd), - - stdin, stdout, stderr, -- :: Handle - - openFile, -- :: FilePath -> IOMode -> IO Handle - hClose, -- :: Handle -> IO () - hFileSize, -- :: Handle -> IO Integer - hIsEOF, -- :: Handle -> IO Bool - isEOF, -- :: IO Bool - - hSetBuffering, -- :: Handle -> BufferMode -> IO () - hGetBuffering, -- :: Handle -> IO BufferMode - hFlush, -- :: Handle -> IO () - hGetPosn, -- :: Handle -> IO HandlePosn - hSetPosn, -- :: HandlePosn -> IO () - hSeek, -- :: Handle -> SeekMode -> Integer -> IO () - hWaitForInput, -- :: Handle -> Int -> IO Bool - hReady, -- :: Handle -> IO Bool - hGetChar, -- :: Handle -> IO Char - hGetLine, -- :: Handle -> IO [Char] - hLookAhead, -- :: Handle -> IO Char - hGetContents, -- :: Handle -> IO [Char] - hPutChar, -- :: Handle -> Char -> IO () - hPutStr, -- :: Handle -> [Char] -> IO () - hPutStrLn, -- :: Handle -> [Char] -> IO () - hPrint, -- :: Show a => Handle -> a -> IO () - hIsOpen, hIsClosed, -- :: Handle -> IO Bool - hIsReadable, hIsWritable, -- :: Handle -> IO Bool - hIsSeekable, -- :: Handle -> IO Bool - - isAlreadyExistsError, isDoesNotExistError, -- :: IOError -> Bool - isAlreadyInUseError, isFullError, - isEOFError, isIllegalOperation, - isPermissionError, isUserError, - - ioeGetErrorString, -- :: IOError -> String - ioeGetHandle, -- :: IOError -> Maybe Handle - ioeGetFileName, -- :: IOError -> Maybe FilePath - - try, -- :: IO a -> IO (Either IOError a) - bracket, -- :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c - bracket_, -- :: IO a -> (a -> IO b) -> IO c -> IO c - - -- Non-standard extension (but will hopefully become standard with 1.5) is - -- to export the Prelude io functions via IO (in addition to exporting them - -- from the prelude...for now.) - IO, - FilePath, -- :: String - IOError, - ioError, -- :: IOError -> IO a - userError, -- :: String -> IOError - catch, -- :: IO a -> (IOError -> IO a) -> IO a - interact, -- :: (String -> String) -> IO () - - putChar, -- :: Char -> IO () - putStr, -- :: String -> IO () - putStrLn, -- :: String -> IO () - print, -- :: Show a => a -> IO () - getChar, -- :: IO Char - getLine, -- :: IO String - getContents, -- :: IO String - readFile, -- :: FilePath -> IO String - writeFile, -- :: FilePath -> String -> IO () - appendFile, -- :: FilePath -> String -> IO () - readIO, -- :: Read a => String -> IO a - readLn, -- :: Read a => IO a - - ) where - -import PrelIOBase -- Together these four Prelude modules define -import PrelRead -import PrelHandle -- all the stuff exported by IO for the GHC version -import PrelIO -import PrelException -\end{code} |