summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-09-20 19:45:29 +0200
committerDavid Roundy <droundy@darcs.net>2007-09-20 19:45:29 +0200
commit6de39ed25a10ecc4a9fa2a933cd214296228e57c (patch)
tree3f428102eb38e9971cccd233edb9c8c93d96040a /XMonad.hs
parent4b21bd7390a67251d5d4fe8a209171601706930c (diff)
downloadmetatile-6de39ed25a10ecc4a9fa2a933cd214296228e57c.tar
metatile-6de39ed25a10ecc4a9fa2a933cd214296228e57c.zip
add Read instance to Layout.
darcs-hash:20070920174529-72aca-b1cf11419d5cccbf67edbc3a7bbb356502e9186d
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad.hs b/XMonad.hs
index 56d7a00..a9253c9 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -134,8 +134,10 @@ atom_WM_STATE = getAtom "WM_STATE"
data SomeLayout a = forall l. Layout l a => SomeLayout (l a)
instance Show (SomeLayout a) where
show (SomeLayout l) = show l
+instance Read (SomeLayout a) where
+ readsPrec _ _ = [] -- We can't read an existential type!!!
-class Show (layout a) => Layout layout a where
+class (Show (layout a), Read (layout a)) => Layout layout a where
doLayout :: layout a -> Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (layout a))
modifyLayout :: layout a -> SomeMessage -> X (Maybe (layout a))