
7 Jul
2008
7 Jul
'08
10 a.m.
On Mon, 7 Jul 2008, Yitzchak Gale wrote:
Henning Thielemann wrote:
I don't see the problem. Current 'bracket' would be used for bracketing current IO code, new 'bracket' would be used to bracket new ErrorT based IO code.
bracket is a GHC primitive. It works only directly with IO, not with other monads. I don't think there is any way to write "new bracket" right now.
We could catch GHC primitive exceptions and return pure ExceptionalResult (aka Either) in the basic IO routines like 'readFile'. Btw. new IO modules would also give us the opportunity to get rid of hPut, hGetLine and friends, and convert them to H.put, H.getLine etc.