aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaniel <daniel@wagner-home.com>2007-06-24 19:17:40 +0200
committerdaniel <daniel@wagner-home.com>2007-06-24 19:17:40 +0200
commitc9ccdd3f0994e35231a5cbe86dd14e1ed5394b80 (patch)
treee0d92d160e5703ee194bbe04e72ad02758b17e58
parentbd8189768d102f37c9a4b3575b1afb1c039b798b (diff)
downloadXMonadContrib-c9ccdd3f0994e35231a5cbe86dd14e1ed5394b80.tar.gz
XMonadContrib-c9ccdd3f0994e35231a5cbe86dd14e1ed5394b80.tar.xz
XMonadContrib-c9ccdd3f0994e35231a5cbe86dd14e1ed5394b80.zip
remove BackCompat.hs
darcs-hash:20070624171740-c98ca-d137e376f0c02712d59dbc65c5aef015d4e6a57d.gz
-rw-r--r--BackCompat.hs62
1 files changed, 0 insertions, 62 deletions
diff --git a/BackCompat.hs b/BackCompat.hs
deleted file mode 100644
index bb0e99b..0000000
--- a/BackCompat.hs
+++ /dev/null
@@ -1,62 +0,0 @@
------------------------------------------------------------------------------
--- |
--- Module : XMonadContrib.BackCompat
--- Copyright : (c) daniel@wagner-home.com
--- License : BSD-style (see xmonad/LICENSE)
---
--- Maintainer : daniel@wagner-home.com
--- Stability : unstable
--- Portability : unportable
---
--- A module that provides back compatibility with GHC 6.4
---
------------------------------------------------------------------------------
-module XMonadContrib.BackCompat (
- -- * Usage
- -- $usage
- forM, forM_
- ) where
-
-import Data.Map (Map, fromList)
-import GHC.Read
-
-{- $usage
-
-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
-
--}
-
-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
- (xs, s3) <- readPairs s2
- ("}", s4) <- lex s3
- return (fromList xs, s4)
-
--- parses a pair of things with the syntax a:=b
--- stolen from the GHC 6.6 sources
-readPair :: (Read a, Read b) => ReadS (a,b)
-readPair s = do (a, ct1) <- reads s
- (":=", ct2) <- lex ct1
- (b, ct3) <- reads ct2
- return ((a,b), ct3)
-
-readPairs :: (Read a, Read b) => ReadS [(a,b)]
-readPairs s1 = case readPair s1 of
- [(p, s2)] -> case s2 of
- (',':s3) -> do
- (ps, s4) <- readPairs s3
- return (p:ps, s4)
- _ -> [([p], s2)]
- _ -> [([],s1)]