[xmonad] patches to use data-default

Daniel Wagner wagnerdm at seas.upenn.edu
Tue May 28 03:47:40 CEST 2013


I noticed that there's a lot of places in xmonad and xmonad-contrib 
where we have manually-namespaced, monomorphic default values 
(especially for configurations and such things). The data-default 
package was designed for this, so I've drawn up a patch to use it.

I've included two patch bundles, one for the xmonad repository, and one 
for the xmonad-contrib repository. (Technically, I have enough 
permissions to apply the xmonad-contrib ones myself; but I wanted to 
invite some review.) The bundle for -contrib includes three patches, in 
roughly increasing order of pervasiveness:

1. the minimal change to make things compile with the -core patch
2. a patch which eliminates all references to defaultConfig (including 
in the documentation)
3. a patch that uses data-default for things like defaultXPConfig, 
defaultPP, and similar things

I've done my best to:
* maintain backwards compatibility. Configs that use these symbols 
should generate a warning, but still work perfectly correctly.
* ensure that all the places that used to export default values now 
also export "def", so that working configs can eliminate the warnings 
without changing their imports (or at worst change imports of 
defaultXPConfig, etc. to imports of def)

Enjoy!
~d
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: data-default-xmonad.dpatch
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20130527/50c75205/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: data-default-xmonad-contrib.dpatch
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20130527/50c75205/attachment-0001.asc>


More information about the xmonad mailing list