[xmonad] How do you test ManageHook using QuickCheck?

adam vogt vogt.adam at gmail.com
Tue Feb 7 13:11:34 CET 2012

On Mon, Feb 6, 2012 at 10:38 AM,  <wagnerdm at seas.upenn.edu> wrote:
> The core xmonad code goes to great lengths to keep the bulk of its
> functionality pure, with a smallish wrapper to communicate with X, and
> provides a fairly comprehensive QuickCheck test suite. (See the "tests"
> directory in the repository.) Perhaps you can take some inspiration from
> there.
> ~d

The "wrapper to communicate with X" is unfortunately the majority of
the code. It should be possible to change the IO functions to ones
that manipulate a haskell model of what the X does. Most of the effort
would end up going into making sure the model is correct.

Some bugs you might be able to find with that approach are situations
where xmonad tells X to go through an excess number of steps to get to
the final state. This is probably a problem for configs using lots of
contrib modules (NoBorders, Decoration, etc.).


More information about the xmonad mailing list