Re: [Haskell-cafe] enumerators: exception that can't be catched

2013-08-29 Thread Yuras Shumovich
Hi, Isn't it by design? Consider the next code: import Data.Enumerator (($$), (>>==)) import qualified Data.Enumerator as E import qualified Data.Enumerator.List as EL import Control.Exception import Control.Monad.IO.Class main :: IO () main = do res <- E.run $ myEnum $$ EL.take 5 `E.cat

Re: [Haskell-cafe] enumerators: exception that can't be catched

2013-08-29 Thread Yuras Shumovich
Hi, Thank you for the reply. Unlikely it is the case (if I understand it correctly). The exception is thrown by "enumSocket", I added traces to prove that. And it is propagated to "runWithSocket" ( http://hackage.haskell.org/packages/archive/websockets/0.7.4.0/doc/html/src/Network-WebSockets-So

Re: [Haskell-cafe] enumerators: exception that can't be catched

2013-08-27 Thread Ben Doyle
This is partially guesswork, but the code to catchWSError looks dubious: catchWsError :: WebSockets p a -> (SomeException -> WebSockets p a) -> WebSockets p a catchWsError act c = WebSockets $ do env <- ask let it = peelWebSockets env $ act cit = pe