[Haskell-cafe] Practical use of Stream's monad instance?

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Sun Jul 10 22:58:33 UTC 2016

On Sun, Jul 10, 2016 at 08:27:40PM +0000, Petr Pudlák wrote:
> we've been debating the usefulness of Monad instances for Stream [2] or
> homogeneous tuples (fixed-length vectors). The Applicative implementation
> for them is simply zipping, very useful indeed. The "join" of their Monad
> instances takes the diagonal of a 2-dimensional plane (finite for tuples,
> infinite for Stream). (See also [1].)
> The question is, are such monad instances used in the wild? Are they
> actually useful or interesting for anything?

They are all equivalent to `Reader a`, for some choice of `a`.

More information about the Haskell-Cafe mailing list