concept do notation in category idris

appears as: do notation, do notation
Type-Driven Development with Idris

This is an excerpt from Manning's book Type-Driven Development with Idris.

Here, main describes not just one action but a sequence of actions. In general, in interactive programs you need to be able to sequence actions and have commands react to user input. Therefore, Idris provides facilities for combining smaller interactive programs into larger ones. We’ll begin by seeing how to do this using a Prelude function, (>>=), and then we’ll look at the higher-level syntax we used earlier in listing 5.1, the do notation.

Idris translates the do notation into applications of >>=. Figure 5.3 shows how this works in the simplest case, where an action is to be executed, followed by more actions.