The problem is that operation on consensus state (which includes blockchain state with the mempool state) must be pure. And in some contexts generation of reward transactions must be in IO.
Thus, interface to invent a block to mine was changed to two functions: pure function to obtain a good header and list of transactions to include into block and IO action to create a block from header and list of transactions, including the aforementioned reward transaction.
The problem is that operation on consensus state (which includes blockchain state with the mempool state) must be pure. And in some contexts generation of reward transactions must be in IO.
Thus, interface to invent a block to mine was changed to two functions: pure function to obtain a good header and list of transactions to include into block and IO action to create a block from header and list of transactions, including the aforementioned reward transaction.
That's all.