codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

Make Query an instance of Applicative? #578

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is an enhancement request: Could you make XMonad.Core.Query an instance of 
Applicative? Since it's already an instance of Monad and DeriveApplicative is 
available.

It will allow more concise queries and we can get rid of "Orphan instance" 
warnings
when deriving Applicative manually.

e.g.:

((&&) <$> fmap (== "FooClass") className
      <*> fmap (== "Bar title") title)

Thanks.

Original issue reported on code.google.com by Javra...@gmail.com on 7 Oct 2014 at 6:57

GoogleCodeExporter commented 8 years ago
We need to do this anyway with the AMP landing in 7.10.

Original comment by allber...@gmail.com on 7 Oct 2014 at 6:58

GoogleCodeExporter commented 8 years ago
Thanks for your response! My concern is it'll be a while before releasing 7.10, 
and I guess applying this changes won't break too many things. But this won't 
be a big deal anyway. Looking forward to 7.10 as well :)

Original comment by Javra...@gmail.com on 7 Oct 2014 at 7:07

GoogleCodeExporter commented 8 years ago
Actually GHC HQ was pushing hard to get 7.10 out (but has recently acknowledged 
that another 7.8 bugfix release is urgently needed first). We still know 
already that AMP *will* be landing, and should deal with it sooner rather than 
later; apps are supposed to be adding support now and release well before 7.10 
so there isn't instant breakage when 7.10 goes gold.

(Or, shorter: I was supporting your request because we are supposed to be 
adding that now, not later.)

Original comment by allber...@gmail.com on 7 Oct 2014 at 7:26

GoogleCodeExporter commented 8 years ago
It looks like Query implements Applicative now [1]. Should we close this bug?

[1] http://code.haskell.org/xmonad/src/XMonad/Core.hs

Original comment by lambda.f...@gmail.com on 20 Oct 2014 at 4:13

GoogleCodeExporter commented 8 years ago
Thanks it has already been fixed in darcs for a few months now.

Original comment by vogt.a...@gmail.com on 20 Oct 2014 at 2:03