On Nov 3, 2014 9:15 PM, "Brandon Allbery" <allbery.b@gmail.com> wrote
> On Mon, Nov 3, 2014 at 10:02 PM, Jeffrey Brown <jeffbrown.the@gmail.com> wrote:
>> Stated differently: Monadic code can call pure code. Can pure code ever call monadic code?
> Something like runReaderT or runST? Or in the extreme case, unsafePerformIO --- which is unsafe for a reason, and trying to use it to sneak into IO from pure code will usually cause major problems, because pure code does not expect non-deterministic results. Otherwise, the type system does its best to avoid you unexpectedly dipping into e.g. IO from inside pure code.

To be more general, the monad typeclass doesn't include an operation that returns a value that doesn't have the type of the monad, so the answer in general is no. Specific instances of the typeclass can have such operations. Brandon gave some examples of those.