2 ms·
And you should use the type "Log m => String -> m ()" instead of general IO. This way, for one example, you can log in some State-derived monad, keeping logs f
by thesz 5y ago
And you should use the type "Log m => String -> m ()" instead of general IO.
This way, for one example, you can log in some State-derived monad, keeping logs for caller to extract and use. It is as safe as pure function. And, of course, it is trivial to implement in IO.