darcs patch: Generalize the type of (<+>). It can be used for keybi...

Sat Dec 5 18:36:11 EST 2009 Adam Vogt

Nice observation. Why don't we just get rid of it and use mappend now? -- Don vogt.adam: > Sat Dec 5 18:36:11 EST 2009 Adam Vogt> * Generalize the type of (<+>). It can be used for keybindings too. Content-Description: A darcs patch for your repository! > > New patches: > > [Generalize the type of (<+>). It can be used for keybindings too. > Adam Vogt **20091205233611 > Ignore-this: af15248be5e483d1a6e924f786fcc1c4 > ] hunk ./XMonad/ManageHook.hs 40 > idHook :: ManageHook > idHook = doF id > > --- | Compose two 'ManageHook's. > -(<+>) :: ManageHook -> ManageHook -> ManageHook > +-- | Infix 'mappend'. Compose two 'ManageHook' from right to left. > +(<+>) :: Monoid m => m -> m -> m > (<+>) = mappend > > -- | Compose the list of 'ManageHook's. > > Context: > > [Swap the order that windows are mapped/unmapped. Addresses #322 > Spencer Janssen **20091119025440 > Ignore-this: 22087204f1b84dae98a3cf2b7f116d3f > ] > [Add GPL warning to GenerateManpage > Spencer Janssen **20091111000106 > Ignore-this: ea24691b8198976a4088a2708e0b4c94 > ] > [Add a basic header to the html manpage output > Adam Vogt **20091028033042 > Ignore-this: 2641e0fb3179616075fa7549b57740f3 > ] > [Use pandoc to convert a markdown manpage tranlation to html and man. > Adam Vogt **20091028030639 > Ignore-this: cdf7cdc8e44b21de8fc7725bde299792 > ] > [Support for extensible state in contrib modules. > Daniel Schoepe **20091106115050 > Ignore-this: d04ee1989313ed5710c94f9d7fda3f2a > ] > [Set SIGPIPE to default in forked processes > Spencer Janssen **20091106223743 > Ignore-this: f73943e4fe6c5f08967ddb82afad3eaa > ] > [TAG 0.9 > Spencer Janssen **20091026004641 > Ignore-this: 80347d432f3b606c8d722536d0d729aa > ] > [Bump version to 0.9 > Spencer Janssen **20091026004543 > Ignore-this: 494efab8313c37c2b1297e92a4896b5c > ] > [Grab the xmonad.cabal version for putting into the manpage > Adam Vogt **20091024200920 > Ignore-this: 574565100ef9198588dcc36b4262a07f > ] > [Correct formatting in manpage > Adam Vogt **20091024200748 > Ignore-this: e142a576042f5977e5436ee280bec59c > ] > [depend on X11 >= 1.4.6.1, for conformity with XMC > Don Stewart **20091024212409] > [Fix for Tall documentation > Khudyakov Alexey **20090516104753 > Ignore-this: ba56921cc5b3be0462c41d10499ccf0e > ] > [correct a comment > Daniel Wagner **20090727032024 > Ignore-this: abbf4269b4161c4e6cf375ab2c8892da > ] > [man/xmonad.hs is in data-files, remove it from extra-source-files > Spencer Janssen **20091023031457 > Ignore-this: d201a7c16f68213c7de62481ea7f5b4f > ] > [Add the template config as distributed file. > Adam Vogt **20091022041402 > Ignore-this: 2c3ef853ecc0a0d037dd0dfb3087ce99 > ] > [Note in manpage that 'exec xmonad' should be used > Adam Vogt **20090901040538 > Ignore-this: 5c829442916c7390fc80e836272c6933 > ] > [Manual page spelling: maximise -> maximize, utilising -> utilizing > Adam Vogt **20090901040217 > Ignore-this: 59cce0620bdb28147dbb3032fbec73a9 > ] > [Describe modular configuration in the manual page > Adam Vogt **20090901040046 > Ignore-this: 4f4832d44d86773d1f81cb86026811b1 > ] > [Remove redundant parens > Spencer Janssen **20090918035547 > Ignore-this: aefa46cdb3ad8496e20d15a7e6b5fa52 > ] > [man_xmonad.hs: import Data.Monoid for mempty, keybinding edits > wirtwolff@gmail.com**20090320024624 > Ignore-this: dc8477ffcfdd404f4f60d2cdaf3812d9 > Bring mempty into scope. Add commented ToggleStruts binding. > Replace shadowed modMask in keybindings with modm instead. > ] > [Only watch mtime for .hs, .lhs, .hsc for ~/.xmonad/lib > Adam Vogt **20090503235415 > Ignore-this: e3b1847edf3e07a8182f7fcfc23b00c8 > > Previously xmonad would force a recompile due to the object files being too > new, so only look at files which may contain haskell code. > ] > [Add lib to ghc searchpath with recompilation check > Adam Vogt **20090321232907 > Ignore-this: 8827fb02fe1101d7b66f05d363bef038 > ] > [Remove tabs from ManageHook.hs > Adam Vogt **20090710011424 > Ignore-this: 13903f39b052c025a7bfa50fb701959c > ] > [Set infix 0 --> to reduce parentheses in ManageHooks > Adam Vogt **20090710011308 > Ignore-this: 75804147fffeceddd328869cbca0d20f > > What was previously: > > (appName ?= x <&&> classname ?= y) --> (doFloat <+> doIgnore) > > Can now be: > > appName ?= x <&&> classname ?= y --> doFloat <+> doIgnore > ] > [Pester the user with one (not two) xmessages on config errors > Adam Vogt **20090321233736 > Ignore-this: f481f7d3ba5fca5c53a0b3a87daa32bb > ] > [Minor bugfix in the creation of new StackSets. > Wouter Swierstra **20090503154321] > [Avoid deadly cycle in man/xmonad.hs > Spencer Janssen **20090319081918 > Ignore-this: adcba110caad465a2cbb4b9dca7cb612 > ] > [X.Config.hs, ./man/xmonad.hs: update Event Hook doc > wirtwolff@gmail.com**20090209183837 > Ignore-this: 3792043278932e371e3e2858913a2b17 > ] > [Use records to document Tall's arguments > Spencer Janssen **20090221230628 > Ignore-this: 253c09de793715c18a029406795a42fd > ] > [Fix possible head [] > Joachim Breitner **20090106192026 > This seems to be a rare case, but I just got hit by it. > ] > [ManageHook.doShift: use shiftWin instead of shift > Spencer Janssen **20090219041458 > Ignore-this: 4d7f348d6d394c581ab2809bbc45a2c6 > ] > [Express shift in terms of shiftWin > Spencer Janssen **20090217235343 > Ignore-this: 8f213bca20065a39e7c16027f7b398cf > ] > [Use standard -fforce-recomp instead of undocumented -no-recomp > Don Stewart **20090208165518] > [Support for custom event hooks > Daniel Schoepe **20090203155536 > Ignore-this: f22f1a7ae2d958ba1b3625aa923b7efd > ] > [Make X an instance of Typeable > Daniel Schoepe **20090128215406 > Ignore-this: bb155e62ea4e451460e3b94508dc49d2 > ] > [Add uninstallSignalHandlers, use in spawn > Spencer Janssen **20090122002643 > Ignore-this: d91bde6f965341a2619fe2dde83cc099 > ] > [Create a new session for forked processes > Spencer Janssen **20090122000423 > Ignore-this: f5d9cf254a0b07ddbf204457b7783880 > ] > [TAG 0.8.1 > Spencer Janssen **20090118083910] > [Close stdin in spawned processes > Spencer Janssen **20090117040024 > Ignore-this: 2e372ed6215160adae8da1c44cdede3d > ] > [Document spawnPID > Spencer Janssen **20090117035907 > Ignore-this: 1641bdcf5055b2ec7b9455265f5b1d52 > ] > [Asynchronously recompile/restart xmonad on mod-q > Spencer Janssen **20090117035300 > Ignore-this: 753d8746034f818b81df79003ae5ee0d > ] > [Add --restart, a command line flag to cause a running xmonad process to restart > Spencer Janssen **20090117034959 > Ignore-this: 45c8c8aba7cc7391b95c7e3fb01e5bf9 > ] > [Bump version to 0.8.1 > Spencer Janssen **20090116223621 > Ignore-this: 2e8e9dc7b6ca725542f4afe04253dc57 > ] > [Remove doubleFork, handle SIGCHLD > Spencer Janssen **20090116204742 > Ignore-this: f9b1a65b4f0622922f80ad2ab6c5a52f > This is a rather big change. Rather than make spawned processes become > children of init, we handle them in xmonad. As a side effect of this change, > we never need to use waitForProcess in any contrib module -- in fact, doing so > will raise an exception. The main benefit to handling SIGCHLD is that xmonad > can now be started with 'exec', and will correctly clean up after inherited > child processes. > ] > [Main.hs: escape / in Haddocks > gwern0@gmail.com**20081207020915 > Ignore-this: 2c4525280fbe73c46f3abd8fc13628e9 > This lets haddocks for Main.hs, at least, to build with 2.3.0. > ] > [More flexible userCode function > Daniel Schoepe **20090110221852] > [Call logHook as the very last action in windows > Spencer Janssen **20081209233700 > Ignore-this: 4396ad891b607780f8e4b3b6bbce87e > ] > [Accept inferior crossing events. This patch enables fmouse-focus-follows-screen > Spencer Janssen **20081205045130 > Ignore-this: 3ac329fb92839827aed0a4370784cabd > ] > [Tile all windows at once > Spencer Janssen **20081118074447] > [Factor rational rect scaling into a separate function > Spencer Janssen **20081118072849] > [Change screen focus by clicking on the root window. > Spencer Janssen **20081106224031 > This is a modification of a patch from Joachim Breitner. > ] > [Fix #192. > Spencer Janssen **20081021220059] > [select base < 4 for building on ghc 6.10 > Adam Vogt **20081013214509] > [add killWindow function > Joachim Breitner **20081005001804 > This is required to kill anything that is not focused, without > having to focus it first. > ] > [add'l documentation > Devin Mullins **20080927234639] > [Regression: ungrab buttons on *non* root windows > Spencer Janssen **20081007214351] > [Partial fix for #40 > Spencer Janssen **20081007212053 > Improvements: > - clicking on the root will change focus to that screen > - moving the mouse from a window on a screen to an empty screen changes focus > to that screen > The only remaining issue is that moving the mouse between two empty screens > does not change focus. In order to solve this, we'd have to select motion events > on the root window, which is potentially expensive. > ] > [Track mouse position via events received > Spencer Janssen **20081007203953] > [Fix haddock > Spencer Janssen **20081007094641] > [Move screen locating code into pointScreen > Spencer Janssen **20081007094207] > [Make pointWithin a top-level binding > Spencer Janssen **20081007090229] > [sp README, CONFIG, STYLE, TODO > gwern0@gmail.com**20080913024457] > [Use the same X11 dependency as xmonad-contrib > Spencer Janssen **20080921061508] > [Export focusUp' and focusDown' -- work entirely on stacks > Spencer Janssen **20080911214803] > [add W.shiftMaster, fix float/tile-reordering bug > Devin Mullins **20080911053909] > [TAG 0.8 > Spencer Janssen **20080905195412] > Patch bundle hash: > 538423d0ff33bb346375248acfc4b5320f7d3483 > _______________________________________________ > xmonad mailing list > xmonad@haskell.org > http://www.haskell.org/mailman/listinfo/xmonad

* On Saturday, December 05 2009, Don Stewart wrote:
Nice observation. Why don't we just get rid of it and use mappend now?
-- Don
vogt.adam:
Sat Dec 5 18:36:11 EST 2009 Adam Vogt
* Generalize the type of (<+>). It can be used for keybindings too.
Firstly, there is the backwards-compatibility issue to deal with after removing <+>. The same applies for composeAll. Also, I find the <+> operator to be slightly more convenient to write than `mappend`. Only the first point is an issue that could be addressed by a textual substitution-based config updater (or better-yet, one using the AST parsed from haskell-src-exts), but that has not been done yet. -- Adam

On Dec 5, 2009, at 23:17 , Adam Vogt wrote:
* On Saturday, December 05 2009, Don Stewart wrote:
Nice observation. Why don't we just get rid of it and use mappend now?
vogt.adam:
Sat Dec 5 18:36:11 EST 2009 Adam Vogt
* Generalize the type of (<+>). It can be used for keybindings too. Firstly, there is the backwards-compatibility issue to deal with after removing <+>. The same applies for composeAll.
Meh.
(<+>) = mappend
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

allbery:
On Dec 5, 2009, at 23:17 , Adam Vogt wrote:
* On Saturday, December 05 2009, Don Stewart wrote:
Nice observation. Why don't we just get rid of it and use mappend now?
vogt.adam:
Sat Dec 5 18:36:11 EST 2009 Adam Vogt
* Generalize the type of (<+>). It can be used for keybindings too. Firstly, there is the backwards-compatibility issue to deal with after removing <+>. The same applies for composeAll.
Meh.
Well, breaking configs is a /bad/ thing. We've seen a lot of heat on awesome because of this, so it isn't something to do lightly. -- Don

Don Stewart
Well, breaking configs is a /bad/ thing. We've seen a lot of heat on awesome because of this, so it isn't something to do lightly.
Yes, we want to learn from our competitor's mistakes so that _we_ don't make them. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Dec 5, 2009, at 23:49 , Don Stewart wrote:
Well, breaking configs is a /bad/ thing. We've seen a lot of heat on awesome because of this, so it isn't something to do lightly.
Hm? I thought defining <+> as mappend was already pending on libraries@? (And would that really break configs?) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Sun, Dec 6, 2009 at 12:04 AM, Brandon S. Allbery KF8NH
On Dec 5, 2009, at 23:49 , Don Stewart wrote:
Well, breaking configs is a /bad/ thing. We've seen a lot of heat on awesome because of this, so it isn't something to do lightly.
Hm? I thought defining <+> as mappend was already pending on libraries@? (And would that really break configs?)
Even if Control.Monoid got <+>, Xmonad core couldn't remove <+> entirely - what about people doing things like 'import XMonad (...(<+>))'? If we have to re-export, might as well just keep a a line like '(<+>) = mappend'. This is definitely not worth breaking configs over. -- gwern

On Dec 6, 2009, at 00:29 , Gwern Branwen wrote:
If we have to re-export, might as well just keep a a line like '(<+>) = mappend'. This is definitely not worth breaking configs over.
That *was* my original suggestion, which dons dropped, apparently misinterpreting my reaction (which was supposed to mean "I don't see it as a big deal given that we can just make <+> = mappend"). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

allbery:
On Dec 6, 2009, at 00:29 , Gwern Branwen wrote:
If we have to re-export, might as well just keep a a line like '(<+>) = mappend'. This is definitely not worth breaking configs over.
That *was* my original suggestion, which dons dropped, apparently misinterpreting my reaction (which was supposed to mean "I don't see it as a big deal given that we can just make <+> = mappend").
No no, I support that we just keep (<+>) in there for now. -- Don

2009/12/6 Don Stewart
Nice observation. Why don't we just get rid of it and use mappend now?
So we're renaming XMonad to XCaleMonad? :p -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com Jonathan Swift - "May you live every day of your life." - http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html

On Sat, Dec 05, 2009 at 04:38:17PM -0800, Don Stewart wrote:
Nice observation. Why don't we just get rid of it and use mappend now?
In my opinion, <+> looks less obscure and intimidating than mappend, to people new to Haskell/xmonad.

Daniel Schoepe
On Sat, Dec 05, 2009 at 04:38:17PM -0800, Don Stewart wrote:
Nice observation. Why don't we just get rid of it and use mappend now?
In my opinion, <+> looks less obscure and intimidating than mappend, to people new to Haskell/xmonad.
Agreed. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

This 1-patch bundle was just applied to http://code.haskell.org/xmonad:
20091205233611 Adam Vogt
participants (8)
-
Adam Vogt
-
Brandon S. Allbery KF8NH
-
Daniel Schoepe
-
darcswatch@nomeata.de
-
Don Stewart
-
Gwern Branwen
-
Ivan Lazar Miljenovic
-
Ivan Miljenovic