
After almost two months with Haskell I'm starting to understand why its use is not as widespread as... well pick a favorite language of your own. My issue was that of indentation. Compare this working version: liftIOTrap io = do mx <- liftIO (do x <- io return (return x) `catchError` (\e -> do let x = fromIOError e trace_ $ "Caught " ++ x return $ throwError x )) mx With the one below On Nov 16, 2005, at 2:27 PM, Joel Reymont wrote:
liftIOTrap io = do mx <- liftIO (do x <- io return (return x) `catchError` (\e -> return (throwError (fromIOError e)))) mx