aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix
Commit message (Collapse)AuthorAge
* [project @ 2002-12-19 13:52:55 by simonmar]Gravatar simonmar2002-12-19
| | | | | | | | | Fill in some more bits in the new Unix library: specifically the contents of PosixTTY and PosixDB (now System.Posix.Terminal and System.Posix.User respectively). We're now about 95% complete w.r.t. the old posix library. I've identified the reminaing bits to do in System/Posix.hs.
* [project @ 2002-12-12 13:42:48 by ross]Gravatar ross2002-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to the exception interface, as discussed on the libraries list. 1) Move bracket and bracket_ from GHC.Exception (and hence System.IO) to haskell98/IO.hs. These two should now never be used (except in all-H98 programs), and this will save users of the new libraries from having to hide them. Use the ones in Control.Exception instead. 2) Define type IOError = IOException -- was Exception leaving the type of Prelude.ioError as IOError -> IO a, but adding to Control.Exception throwIO :: Exception -> IO a The result is a type distinction between the variants of catch and try: Prelude.catch :: IO a -> (IOError -> IO a) -> IO a Control.Exception.catch :: IO a -> (Exception -> IO a) -> IO a System.IO.Error.try :: IO a -> IO (Either IOError a) Control.Exception.try :: IO a -> IO (Either Exception a) These are breaking changes: the first one affects only import lists, but the second will bite in the following situations: - using ioError on general Exceptions: use throwIO instead. - using throw on IOErrors: if in the IO monad, use ioError instead. Otherwise, use throw (IOException e), but why are you throwing IO exceptions outside of the IO monad? Minor changes: - System.IO.Error now exports catch and try - moved try from GHC.Exception to System.IO.Error, because it's portable and can be shared by Hugs.
* [project @ 2002-11-18 08:37:35 by stolz]Gravatar stolz2002-11-18
| | | | | | readlink(2) does not append a NUL character to buffer. Noticed by: John Meacham <john@repetae.net>
* [project @ 2002-10-11 14:25:25 by stolz]Gravatar stolz2002-10-11
| | | | 'usleep' nightmare: Sometimes return type is void, sometimes int.
* [project @ 2002-10-08 08:03:02 by wolfgang]Gravatar wolfgang2002-10-08
| | | | | | | | | Make the new Posix bindings compile on Mac OS X. Most notable, Mac OS X lacks *) lchown *) SIGPOLL I don't know of a replacement of either, so they are just left out when they are not detected by configure.
* [project @ 2002-09-14 09:35:00 by panne]Gravatar panne2002-09-14
| | | | | 4th attempt to get a working RPM, but again: Make Haddock happy. Is doing a "make html" that hard before committing...? :-]
* [project @ 2002-09-13 09:12:12 by simonmar]Gravatar simonmar2002-09-13
| | | | | | | - #include <sys/resource.h> to get at get/setpriority. - #include "config.h", and protect other includes according to the configure results.
* [project @ 2002-09-12 16:38:21 by simonmar]Gravatar simonmar2002-09-12
| | | | More POSIX bits... we're getting there.
* [project @ 2002-09-06 14:34:15 by simonmar]Gravatar simonmar2002-09-06
Partial rewrite of the POSIX library. The main purpose of this sweep is to remove the last dependencies of the compiler on hslibs. When I've committed the associated compiler changes, only the 'base' package will be required to bootstrap the compiler. Additionally to build GHCi, the 'readline' and 'unix' packages will be required. The new POSIX library lives mostly in libraries/unix, with a few bits required for compiler bootstrapping in libraries/base. The 'base' package is mostly free of hsc2hs code to make bootstrapping from HC files easier, but the 'unix' package will use hsc2hs liberally. The old POSIX library continues to provide more-or-less the same interface as before, although some of the types are more correct now (previously lots of POSIX types were just mapped to Int). The new interface is largely the same as the old, except that some new functionality from the latest POSIX spec has been added (eg. symbolic links). So far, the new POSIX library has signal support, directory/file operations and lots of stuff from unistd.h. The module names are: System.Posix The main dude, exports everything System.Posix.Types All the POSIX types, using the same naming scheme as Foreign.C.Types, Eg. CUid, COff, etc. Many of these types were previously exported by GHC.Posix. Additionally exports the "nicer" names used by the old POSIX library for compatibility (eg. ProcessID == CPid, FileMode == CMode, etc.) All reasonable instances are derived for these types. System.Posix.Signals Signal support, contains most of which was in PosixProcPrim before. The RTS interface to the signal handling support has been rationalised slightly. System.Posix.Directory Directory support, most were in PosixFiles before. System.Posix.Files File operations, most were in PosixFiles before. System.Posix.Unistd (for want of a better name) Miscellaneous bits that mostly come from the unistd.h header file. PosixProcEnv before. The rest of the library should pan out like so: System.Posix.IO System.Posix.Error (maybe) System.Posix.Process System.Posix.Terminal (I've no doubt broken Win32 support, but I'm checking the build at the moment).