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

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.
Thanks,
Andrea
Wed Jan 30 07:48:29 CET 2008 Andrea Rossato

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) andrea

Wed Jan 30 07:48:29 CET 2008 Andrea Rossato
* Update to API change: LayoutClass.decoration change its type Wed Jan 30 08:17:52 CET 2008 Andrea Rossato
* CycleSelectedLayouts and TwoPane: updated to the new description type
please forget. a
participants (1)
-
Andrea Rossato