Re: [Haskell] generic catch in a MonadIO

2006-02-08 Thread Andrew Pimlott
On Wed, Feb 08, 2006 at 12:59:48AM -0500, David Menendez wrote: > Since the monad transformers in MTL all promote MonadError, you can also > use throwError and catchError with instances of MonadIO. Currently, the > error type associated with IO is IOError, not Exception, but it should > be possible

[Haskell] Re: generic catch in a MonadIO

2006-02-08 Thread Ashley Yakeley
Taral wrote: On 2/8/06, Ashley Yakeley <[EMAIL PROTECTED]> wrote: IIRC, that subset is types that can implement this: class (MonadIO m) => StrictMonadIO m where getUnliftIO :: m (m a -> IO a) You probably mean "m (forall a. m a -> IO a)" and that is not allowed. Actually, I think

Re: [Haskell] Re: generic catch in a MonadIO

2006-02-08 Thread Taral
On 2/8/06, Ashley Yakeley <[EMAIL PROTECTED]> wrote: > IIRC, that subset is types that can implement this: > >class (MonadIO m) => StrictMonadIO m where >getUnliftIO :: m (m a -> IO a) You probably mean "m (forall a. m a -> IO a)" and that is not allowed. You have to CPS it: withUnlif

[Haskell] Re: generic catch in a MonadIO

2006-02-08 Thread Ashley Yakeley
[EMAIL PROTECTED] wrote: The ability to use functions 'catch', 'bracket', 'catchDyn', etc. in MonadIO other than IO itself has been a fairly frequently requested feature: ... The reason it is not implemented is because these functions cannot be defined for a general MonadIO. However, these func

[Haskell] RFC: Streams: CharEncoding transformer

2006-02-08 Thread Bulat Ziganshin
Hello Streams library includes CharEncoding transformer that allows to read/write files in UTF-8 and any other encodings. according to the Einar's requirement, i made CharEncoding transformer dynamic - apllied encoding can be changed at any time. now i thinks that this design may limit speed of en