[Haskell-cafe] Newtype derivation understanding problem

Mikael Brockman mbrock at goula.sh
Thu Jul 31 11:00:26 UTC 2014

Konstantine Rybnikov <k-bx at k-bx.com> writes:

> Excuse me if the question is silly.
> Thought this MonadCatchIO will be removed in next version of snap,
> current version has it and I can't understand this derivation: [0]
> L.Lensed seems like just a newtype wrapper around a function [1], and
> there is no instance of MonadCatchIO for a function.
> How is it derived?

You probably just missed it, but there's a MonadCatchIO instance for
L.Lensed, and so the derived instance for Handler is trivial.

More information about the Haskell-Cafe mailing list