lisa.monad: Replace the State monad implementation
BREAKING CHANGE FEATURE Replace the original custom-made State monad implementation with a full featured monad transformer implementation. This will allow combining multiple independent state monads, as well as interop with event loops (e.g. asyncio), and allow new effects to be added along the way such as the short-circuiting Option. Breaking changes: * Remove the automatic awaiting of monadic arguments to user-defined coroutine functions. The reason is that it was a misfeature that worked for the lisa.fuzz.Gen monad, but is actually quite problematic for other state monads as the user looses control over the ordering of side effects. This can unfortunately be extremely important for some monads. * Re-purpose the "lift" method to act like a monad transformer lift. Existing use of "Monad.lift()" need to be converted to "Monad.do()" instead. * Rename StateMonad into State * StateMonad values can now only be called once.
Loading
Please register or sign in to comment