In Haskell, when we use a do block, how does it figure out which monad to be used?

Viewed 1540

We know that the do block is just syntactic sugar. But then how does it figure out which monadic context it is in? Assume we don't use <- operator anywhere in the do block.

2 Answers
Related