Use catchIO in the example

This commit is contained in:
Andrzej Rybczak 2024-10-06 15:56:01 +02:00
parent e2b1ffadf8
commit 70e106f9ac

View File

@ -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