
8 Apr
2019
8 Apr
'19
5:38 p.m.
Anything beyond the Functor instance for (Either e), though, models exceptions that abort the computation as soon as the first Left arises. You seem to use the type in a different way which may be one reason why you do not find your functions implemented elsewhere. For logging or warnings, most Haskellers use something like a writer monad transformer. The underlying monad,
Writer w a = (w,a)
That's the thing I was saying destroys streaming. The problem is that it returns ([log], [a]), instead of [Either log a], so the interleaving has been lost.