darcs patch: hide the implementation type in "EwmhDes... (and 1 more)

Hi,
I’ve merged this patch, and re-submit it now. Isn’t it nicer to have the
exposed type less implementation-specific?
Greetings,
Joachim
Tue Jun 10 21:29:18 CEST 2008 Joachim Breitner

I don't have time to apply patches right now, but: On Mon, Sep 08, 2008 at 12:01:35PM +0200, Joachim Breitner wrote:
It could also be wrapped in a newtype, instead of a "type", but that would require manual instances of the various classes, as ghc can automatically derive the LayoutClass instance. Isn't this what GeneralizedNewtypeDeriving does?

Hi, Am Montag, den 08.09.2008, 09:55 -0700 schrieb Devin Mullins:
I don't have time to apply patches right now, but:
On Mon, Sep 08, 2008 at 12:01:35PM +0200, Joachim Breitner wrote:
It could also be wrapped in a newtype, instead of a "type", but that would require manual instances of the various classes, as ghc can automatically derive the LayoutClass instance. Isn't this what GeneralizedNewtypeDeriving does?
Not with multi-parameter typeclasses, if I remember correctly. Otherwise, that would be perfect. Greetings, Joachim -- Joachim "nomeata" Breitner mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nomeata@debian.org

On Mon, Sep 08, 2008 at 12:01:35PM +0200, Joachim Breitner wrote:
Hi,
I???ve merged this patch, and re-submit it now. Isn???t it nicer to have the exposed type less implementation-specific?
Greetings, Joachim
Tue Jun 10 21:29:18 CEST 2008 Joachim Breitner
* hide the implementation type in "EwmhDesktopsLayout" Instead of exporting the EwmhDesktopsHook type, which is used internally, export a type alias for (HandleEvent EwmhDesktopsHook), so users don't have to update their xmonad.hs if the implementation changes. It could also be wrapped in a newtype, instead of a "type", but that would require manual instances of the various classes, as ghc can automatically derive the LayoutClass instance.
Mon Sep 8 11:59:17 CEST 2008 Joachim Breitner
* Merge "hide the implementation type in "EwmhDesktopsLayout""
Can we get this as a fresh patch? We try to avoid pushing conflicts because it can give darcs a headache. Also, I think EwmhDesktopsHook should still be exported, there is no good reason for it not to be. Cheers, Spencer Janssen

Hi, Am Donnerstag, den 11.09.2008, 03:48 -0500 schrieb Spencer Janssen:
On Mon, Sep 08, 2008 at 12:01:35PM +0200, Joachim Breitner wrote:
Hi,
I???ve merged this patch, and re-submit it now. Isn???t it nicer to have the exposed type less implementation-specific?
Greetings, Joachim
Tue Jun 10 21:29:18 CEST 2008 Joachim Breitner
* hide the implementation type in "EwmhDesktopsLayout" Instead of exporting the EwmhDesktopsHook type, which is used internally, export a type alias for (HandleEvent EwmhDesktopsHook), so users don't have to update their xmonad.hs if the implementation changes. It could also be wrapped in a newtype, instead of a "type", but that would require manual instances of the various classes, as ghc can automatically derive the LayoutClass instance.
Mon Sep 8 11:59:17 CEST 2008 Joachim Breitner
* Merge "hide the implementation type in "EwmhDesktopsLayout"" Can we get this as a fresh patch? We try to avoid pushing conflicts because it can give darcs a headache. Also, I think EwmhDesktopsHook should still be exported, there is no good reason for it not to be.
Hmm. If EwmhDesktopHook stays exported, then there is no need for this patch. I’ll just abandon this patch, not that I care a lot about it, as it’s mostly a stylistic question. Greetings, Joachim -- Joachim "nomeata" Breitner mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nomeata@debian.org
participants (3)
-
Devin Mullins
-
Joachim Breitner
-
Spencer Janssen