
On Wed, Mar 13, 2013 at 12:26:47AM -0400, adam vogt wrote:
since we aren't likely to change the type of defaultConfig anytime soon it's fine as-is.
Yeah, that's what I was thinking, too. I got rid of the TODO.
Some configs use do notation for IO in main before calling xmonad, or possibly for sequencing multiple X actions that are supposed to happen with a single keybinding. Enabling -XRebindableSyntax looks like it would force people to use a qualified name like Prelude.>>=, or put the definitions in separate modules. The second option is not necessarily a bad thing.
Maybe it's possible to write a class with a >>= and >> that can work with IO or Prime, but that probably will make type errors even worse.
Okay, I'll look into making such a class. If it doesn't make type errors even worse, it may challenge my type-fu, but I suppose that's a small price to pay. As a consolation, the definitions don't need to be in a separate module. This works: import qualified Prelude as P stuff :: IO () stuff = do spawn "xmessage hi" spawn "xmessage again" where (>>) = (P.>>) Also, FWIW, I got rid of the data-accessor dependency. On the way to making (=+) polymorph with the name of the attribute rather than its type (so I could support (=+) for the new EventMask fields and for 'keys' without running up against instance overlap), I had reimplemented the parts of it that this module uses. New patch attached, and new docs at: http://twifkak.com/xmonad-junk/XMonad-Config-Prime3.html Devin 7 patches for repository http://code.haskell.org/XMonadContrib: Mon Mar 11 02:46:17 PDT 2013 me@twifkak.com * XMonad.Config.Prime, a do-notation for config Note that the use of RebindableSyntax is because of the need to vary the layoutHook type throughout the config. The alternative, using the existen= tial Layout type, was rejected because it required TemplateHaskell in order to= look nice, and TemplateHaskell is not portable. Tue Mar 12 03:36:06 PDT 2013 me@twifkak.com * X.C.Prime: add support for the 3 newest fields Add support for clickJustFocuses, clientMask, and rootMask. Got rid of th= e ill-behaved Summable class. It may return pending a reworking of the acce= ssors. Wed Mar 13 00:38:18 PDT 2013 me@twifkak.com * X.C.Prime: reintroduce Summable class (and friends) This time it's a bit more structural, so it no longer misbehaves. Switche= d 'addKeys' to 'keys =3D+', etc. Wed Mar 13 00:41:13 PDT 2013 me@twifkak.com * X.C.Prime: add startWith (e.g. for gnomeConfig) Wed Mar 13 00:50:43 PDT 2013 me@twifkak.com * X.C.Prime: add 'applyIO' for some future flexibility Wed Mar 13 01:15:29 PDT 2013 me@twifkak.com * X.C.Prime: get rid of the data-accessor dependency The previous patch nearly obviated the library. This one does so complete= ly. Wed Mar 13 01:48:50 PDT 2013 me@twifkak.com * X.C.Prime: fix haddock errors -- Take the time to do it right, otherwise you will have to take the time to do it over. Lucky Numbers 14, 27, 34, 5, 38, 9 LEARN CHINESE - Gift Li-wu 礼物