mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Compatibility with mtl-1 and mtl-2
This commit is contained in:
parent
52d3aa1500
commit
67db59bf73
@ -65,7 +65,7 @@ instance LayoutClass Grid Window where
|
|||||||
doLayout (GridRatio d m) r w = flip (,) Nothing . arrange d m r (integrate w)
|
doLayout (GridRatio d m) r w = flip (,) Nothing . arrange d m r (integrate w)
|
||||||
|
|
||||||
replicateS :: Int -> (a -> (b, a)) -> a -> ([b], a)
|
replicateS :: Int -> (a -> (b, a)) -> a -> ([b], a)
|
||||||
replicateS n = runState . replicateM n . State
|
replicateS n f = runState . replicateM n $ do (a,s) <- gets f; put s; return a
|
||||||
|
|
||||||
doColumn :: Dimension -> Dimension -> Dimension -> [(D -> D)] -> [D]
|
doColumn :: Dimension -> Dimension -> Dimension -> [(D -> D)] -> [D]
|
||||||
doColumn width height k adjs =
|
doColumn width height k adjs =
|
||||||
|
@ -77,7 +77,7 @@ customize :: XConfig l
|
|||||||
-> (XConfig Layout -> [(KeyMask, KeySym)])
|
-> (XConfig Layout -> [(KeyMask, KeySym)])
|
||||||
-> (XConfig Layout -> [((KeyMask, KeySym), X ())])
|
-> (XConfig Layout -> [((KeyMask, KeySym), X ())])
|
||||||
-> Reader (XConfig Layout) (M.Map (KeyMask, KeySym) (X ()))
|
-> Reader (XConfig Layout) (M.Map (KeyMask, KeySym) (X ()))
|
||||||
customize conf ds is = Reader (keys conf) >>= delete ds >>= insert is
|
customize conf ds is = asks (keys conf) >>= delete ds >>= insert is
|
||||||
|
|
||||||
delete :: (MonadReader r m, Ord a) => (r -> [a]) -> M.Map a b -> m (M.Map a b)
|
delete :: (MonadReader r m, Ord a) => (r -> [a]) -> M.Map a b -> m (M.Map a b)
|
||||||
delete dels kmap = asks dels >>= return . foldr M.delete kmap
|
delete dels kmap = asks dels >>= return . foldr M.delete kmap
|
||||||
|
@ -56,7 +56,7 @@ library
|
|||||||
extensions: ForeignFunctionInterface
|
extensions: ForeignFunctionInterface
|
||||||
cpp-options: -DXFT
|
cpp-options: -DXFT
|
||||||
|
|
||||||
build-depends: mtl < 2, unix, X11>=1.5.0.0 && < 1.6, xmonad>=0.9.1, xmonad<0.10, utf8-string
|
build-depends: mtl >= 1 && < 3, unix, X11>=1.5.0.0 && < 1.6, xmonad>=0.9.1, xmonad<0.10, utf8-string
|
||||||
|
|
||||||
if true
|
if true
|
||||||
ghc-options: -fwarn-tabs -Wall
|
ghc-options: -fwarn-tabs -Wall
|
||||||
|
Loading…
x
Reference in New Issue
Block a user