Skip to content

Commit

Permalink
Add back deleted sections from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
googleson78 committed Nov 21, 2020
1 parent eeec19f commit b5d6ee6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Polysemy/Internal/Tactics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import Polysemy.Internal.Union
-- effect @Tactics@, which is capable of rewriting monadic actions so they run
-- in the correct stateful environment.
--
-- The @f@ type here is existential and corresponds to "whatever
-- state the other effects want to keep track of." @f@ is always
-- a 'Functor'.
--
-- Inside a 'Tactical', you're capable of running 'pureT', 'runTSimple', 'bindTSimple',
-- 'runT' and 'bindT', which are the main tools for rewriting monadic stateful environments.
--
Expand Down Expand Up @@ -56,7 +60,12 @@ import Polysemy.Internal.Union
--
-- If we have a kleisli action (e.g. @use :: a -> m b@) we can instead use 'bindTSimple'.
--
-- There are however some cases where these functions are not sufficient.
-- Note that because of the types of @'bindTSimple' use resource@ and @'bindTSimple' dealloc resource@
-- both use @f a@, they must run in the same stateful environment. This
-- means, for illustration, any 'Polysemy.State.put's run inside the @'bindTSimple' use resource@
-- block will not be visible inside of the @dealloc@ block.
--
-- There are however some cases where the @\*Simple@ functions are not sufficient.
--
-- Consider, for example, the 'Polysemy.Reader.local' action.
--
Expand Down

0 comments on commit b5d6ee6

Please sign in to comment.