Hi,
Am Freitag, den 15.02.2013, 14:50 +0000 schrieb Simon Marlow: > On 15/02/13 12:22, Joachim Breitner wrote: > > Hi, > > > > more progress: On top of base-pure, I created base-io involving GHC/IO > > and everything required to build it (which pulled in ST, some of Foreign > > and unfortunately some stuff related to Handles and Devices, because it > > is mentioned in IOException). This is the list of modules: > > > > You have a random collection of modules here :) > > I think you want to have the IO *monad* (GHC.IO) live in a lower layer, > separate from the IO *library* (GHC.IO.Device and so on). Every Haskell > implementation will need the IO monad, but they might want to replace > the IO library with something else. > > Things like GHC.IORef, GHC.MVar can all live in a low-down layer because > they're just wrappers over the primops. Right, that is my aim, and I started with GHC.IO. But unfortunately, the IO monad calls failIO, which is an IOError which has a field of type ioe_handle :: Maybe Handle (and one of type CInt) which pulls in all the rest there, and so far I did not have a good idea how to untangle that. What would break if fail would not raise an IOError, but a separate exception type, e.g. IOFailError? Probably too much, as users expect to catch the exception raised by fail with an exception handler that matches IOError. Greetings, Joachim -- Joachim "nomeata" Breitner Debian Developer [email protected] | ICQ# 74513189 | GPG-Keyid: 4743206C JID: [email protected] | http://people.debian.org/~nomeata
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
