
Hi all, I've been continuing to work on getting xmonad to build under ghc 6.12.1. We're almost there (I've attached a patch for xmonad-contrib; the core is a different story, read on). The main problem with building under 6.12.1 was that it generated three new sorts of warnings on the xmonad codebase (which was incompatible with our policy of using -Werror while testing, aside from simply being ugly). * Redundant imports. I've fixed all of these, see the attached patch. * Unused do binds. Per a previous discussion, this warning is silly so I've added a clause in the .cabal files to disable it for ghc >= 6.12.1. * Deprecated Prelude. xmonad currently requires base < 4 (because we're using the old exceptions framework) but this now generates a warning under ghc 6.12.1 that base-3 will soon be deprecated. For now, I've disabled this warning (unfortunately, this means all OTHER deprecation warnings are disabled too). Really we ought to update to use the extensible-exceptions package, which supposedly would provide a smooth migration path allowing xmonad to build under both base-3 and base-4. I'll let someone who knows more about exception stuff handle this. A couple problems I ran into along the way: * Cabal doesn't correctly order the flags to GHC in a certain situation (if you want to know details, see the recent thread "infelicitous (incorrect?) ordering of flags passed to GHC" on cabal-devel@haskell [1]). To get around this I had to do some minor silly hacks in the .cabal files, like this: if true ghc-flags: -Wall if impl (ghc >= 6.12.1) ghc-flags: -fno-warn-unused-do-bind and so on; putting the "ghc-flags: -Wall" by itself with no 'if true', which ought to be equivalent, does not work, since the flags get passed to ghc in the other order and the -Wall overrides the earlier -fno-warn... * As soon as I thought I was about to get the xmonad core to compile cleanly with no warnings... I got a GHC panic. Oh joy! I will keep looking into this. Hopefully by the time the platform comes out it will include some ghc 6.12.x where x > 1 and does not exhibit this bug. In the meantime, I have attached a patch which updates xmonad-contrib to compile cleanly under ghc 6.12.1. I also tested under ghc 6.10.4 with this patch applied, so as far as I know it shouldn't change or break anything. -Brent [1] http://www.haskell.org/pipermail/cabal-devel/2010-January/006004.html

* On Tuesday, January 12 2010, Brent Yorgey wrote:
Hi all,
I've been continuing to work on getting xmonad to build under ghc 6.12.1. We're almost there (I've attached a patch for xmonad-contrib; the core is a different story, read on).
The main problem with building under 6.12.1 was that it generated three new sorts of warnings on the xmonad codebase (which was incompatible with our policy of using -Werror while testing, aside from simply being ugly).
* Redundant imports. I've fixed all of these, see the attached patch.
* Unused do binds. Per a previous discussion, this warning is silly so I've added a clause in the .cabal files to disable it for ghc
= 6.12.1.
* Deprecated Prelude. xmonad currently requires base < 4 (because we're using the old exceptions framework) but this now generates a warning under ghc 6.12.1 that base-3 will soon be deprecated. For now, I've disabled this warning (unfortunately, this means all OTHER deprecation warnings are disabled too).
Really we ought to update to use the extensible-exceptions package, which supposedly would provide a smooth migration path allowing xmonad to build under both base-3 and base-4. I'll let someone who knows more about exception stuff handle this.
...
In the meantime, I have attached a patch which updates xmonad-contrib to compile cleanly under ghc 6.12.1. I also tested under ghc 6.10.4 with this patch applied, so as far as I know it shouldn't change or break anything.
-Brent
[1] http://www.haskell.org/pipermail/cabal-devel/2010-January/006004.html
I've attached a patch which converts contrib to the use of extensible-exceptions. While in most cases only a couple exceptions should probably be caught rather than all of them, only to translated the existing code to the form extensible-exceptions requires. The same is done for core here: [1] Regarding the -fwarn-unused-do-binds: disabling the warning is quite an unpleasant workaround to the point where it might be just as easy to annotate the 20 or so places that trigger this warning. I'll get around to that sometime, unless there are objections? -- Adam [1] http://www.haskell.org/pipermail/xmonad/2010-January/009582.html

This 2-patches bundle was just applied to http://code.haskell.org/XMonadContrib:
20100112172507 Brent Yorgey

This 1-patch bundle was just applied to http://code.haskell.org/XMonadContrib:
20100112172507 Brent Yorgey
participants (3)
-
Adam Vogt
-
Brent Yorgey
-
darcswatch@nomeata.de