diff options
author | daniel <daniel@wagner-home.com> | 2007-06-05 00:55:34 +0200 |
---|---|---|
committer | daniel <daniel@wagner-home.com> | 2007-06-05 00:55:34 +0200 |
commit | eed29a62d982f028370d4a9957bead22fcb27dda (patch) | |
tree | 6b9e7c286de3dd9ba4342778e2102c5a78f9400c | |
parent | 84ac66c9f2e4fb0aacc569e33427719e5efb9661 (diff) | |
download | XMonadContrib-eed29a62d982f028370d4a9957bead22fcb27dda.tar.gz XMonadContrib-eed29a62d982f028370d4a9957bead22fcb27dda.tar.xz XMonadContrib-eed29a62d982f028370d4a9957bead22fcb27dda.zip |
Contrib package for 6.4 users
darcs-hash:20070604225534-c98ca-f7374f75c0e30ff72391ad1f226c94ca7519f590.gz
-rw-r--r-- | BackCompat.hs (renamed from ReadMap.hs) | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ReadMap.hs b/BackCompat.hs index ab64815..b743b83 100644 --- a/ReadMap.hs +++ b/BackCompat.hs @@ -1,13 +1,21 @@ -module XMonadContrib.ReadMap () where +module XMonadContrib.BackCompat (forM, forM_) where -{- An instance of Read for Data.Map.Map's; useful for people that are still - - compiling under 6.4. To use it, add the following line to StackSet.hs: - - import XMonadContrib.ReadMap +{- This file will contain all the things GHC 6.4 users need to compile xmonad. + - Currently, the steps to get compilation are: + - add the following line to StackSet.hs, Operations.hs, and Main.hs: + - import XMonadContrib.BackCompat -} import Data.Map (Map, fromList) import GHC.Read +forM_ :: (Monad m) => [a] -> (a -> m b) -> m () +forM_ = flip mapM_ + +-- not used yet, but just in case +forM :: (Monad m) => [a] -> (a -> m b) -> m [b] +forM = flip mapM + instance (Ord k, Read k, Read e) => Read (Map k e) where readsPrec _ = \s1 -> do ("{", s2) <- lex s1 |