[Haskell-cafe] What to call Occult Effects

Viktor Dukhovni ietf-dane at dukhovni.org
Thu Nov 12 04:57:15 UTC 2020


On Wed, Nov 11, 2020 at 09:47:43PM -0500, David Feuer wrote:

> If m is occlusive, so is ReaderT e m:
> 
> [...]
> 
> I believe this works for StateT as well.

I am puzzled what you mean by that, given that

    State s a = StateT s Identity a

and while "Identity" is "occlusive", State is not.

    λ> import Control.Monad
    λ> import Control.Monad.Trans.State.Strict
    λ> runState (liftM2 (const id) (put True :: State Bool ()) get) False
    (True,True)
    λ> runState ((const id) (put True :: State Bool ()) get) False
    (False,False)

-- 
    Viktor.


More information about the Haskell-Cafe mailing list