[xmonad] darcs patch: Update to API change: LayoutClass.decora... (and 1 more)

Andrea Rossato mailing_list at istitutocolli.org
Wed Jan 30 02:44:12 EST 2008

On Wed, Jan 30, 2008 at 08:26:39AM +0100, Andrea Rossato wrote:
> This adds a patch to update two other module.
> I would like to elaborate a bit the reason of this change. All the
> AlyoutClass are in the X monad.
> A LayoutCombinator must implement a method for choosing which layout
> to run. I believe that this method should be in the X monad too (this
> is needed to implement a combinator like PerWorkspace): we may want to
> inspect the state, or whatever for choosing a layout to be run, or for
> running 2 layout together and combine their results.
> When it comes to creating the combined description we may want to have
> a look at the chooser. But we cannot because the chooser operates in
> the X monad, while the description does not.
> Actually I believe that's a bug, since I cannot implement a
> Combinator. Either the bug is in the CombinatorClass or in the
> description type. I think it is in the description type. But if
> someone can explain to me that it is indeed in the LayoutCombinator
> class I'm going to change the later, obviously.

obviously you could replay: implement the chooser purely (at fist that
was what I did). But if I limit the class power all I get will be
people writing combinators as instances of the LayoutClass (as it
happens right now) and every time I need to change the LayoutClass
implementation I need to update all combinators.

if the class is powerful enough we can just reject that code as
bugged, and enforce some code safety.

(actually now Mirror and Choose would be rejected as bugged...;)

this is my goal with all the new class clean up (for which I would
like to have some feedback)


More information about the xmonad mailing list