Can monads be used to securely erase data

Indeed the data type linked to is trivial and isomorphic to U1 as well as Const (). The more interesting question to ask is: Can monads be used to securely erase effects? That is, for what monads is

action1 >> action2

observationally equivalent to action2? That question comes up every now and then. Turns out that holds for a surprisingly small class of monads, the reader monad being the prime example. See also here.

1 Like