mirror of
https://github.com/haskell-effectful/effectful.git
synced 2024-11-27 01:45:16 +03:00
Use catchIO in the example
This commit is contained in:
parent
e2b1ffadf8
commit
70e106f9ac
@ -168,7 +168,7 @@ import Effectful.Internal.Utils
|
||||
-- ReadFile path -> adapt $ IO.readFile path
|
||||
-- WriteFile path contents -> adapt $ IO.writeFile path contents
|
||||
-- where
|
||||
-- adapt m = liftIO m `catch` \(e::IOException) -> throwError . FsError $ show e
|
||||
-- adapt m = liftIO m `catchIO` \e -> throwError . FsError $ show e
|
||||
-- :}
|
||||
--
|
||||
-- Here, we use 'interpret' and simply execute corresponding 'IO' actions for
|
||||
|
Loading…
Reference in New Issue
Block a user