merge from "monads-everywhere", adding a monadic interface to several modules