@@ -5,6 +5,26 @@
6-- - very fast.
6-- - very fast.
8+-- /Note:/ unlike 'Control.Monad.Trans.State.StateT', the 'State' effect doesn't
9+-- lose state modifications in presence of runtime exceptions:
11+-- >>> import Control.Exception (ErrorCall)
12+-- >>> import Control.Monad.Catch
14+-- >>> import qualified Control.Monad.Trans.State.Strict as S
16+-- (`S.execStateT` "Hi") . handle (\(_::ErrorCall) -> pure ()) $ do
17+-- S.modify (++ " there!")
23+-- runEff . execState "Hi" . handle (\(_::ErrorCall) -> pure ()) $ do
24+-- modify (++ " there!")
8module Effectful.State.Local
28module Effectful.State.Local
10 , runState
30 , runState