Applicative instance for template haskell's Q

Bas van Dijk v.dijk.bas at
Sun Jan 22 10:49:33 CET 2012

On 22 January 2012 08:00, Antoine Latter <aslatter at> wrote:
> On Sun, Jan 22, 2012 at 12:30 AM, Conal Elliott <conal at> wrote:
>> Any reason not to add an Applicative instance for template haskell's Q
>> (quoting) monad? - Conal


> This came up once before - I think the only downside was that
> Applicative then would have to become a super-class of Quasi.
> I've never seen an instance for Quasi aside from Q and IO, but I
> haven't looked either. I'm guessing the breakage from this would be
> slight.

I think so too. And the breakage is easy to fix. Also note that Quasi
already has a Functor super-class:

class (Monad m, Functor m) => Quasi m

Adding Applicative will make it complete.


More information about the Libraries mailing list