Applicative instance for template haskell's Q

Any reason not to add an Applicative instance for template haskell's Q (quoting) monad? - Conal

On Sun, Jan 22, 2012 at 12:30 AM, Conal Elliott
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. Antoine
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On 22 January 2012 08:00, Antoine Latter
On Sun, Jan 22, 2012 at 12:30 AM, Conal Elliott
wrote: Any reason not to add an Applicative instance for template haskell's Q (quoting) monad? - Conal
+1
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. Bas

I'm ok with this, if there's a consensus in favour. (Are there any downsides?)
If someone is willing to collate responses, check consensus, and send a patch, I'm happy to apply it.
Simon
| -----Original Message-----
| From: libraries-bounces@haskell.org [mailto:libraries-bounces@haskell.org] On
| Behalf Of Michael Snoyman
| Sent: 22 January 2012 07:10
| To: Conal Elliott
| Cc: libraries
| Subject: Re: Applicative instance for template haskell's Q
|
| On Sun, Jan 22, 2012 at 8:30 AM, Conal Elliott
participants (5)
-
Antoine Latter
-
Bas van Dijk
-
Conal Elliott
-
Michael Snoyman
-
Simon Peyton-Jones