diff options
author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2009-09-25 21:21:59 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2009-09-25 21:21:59 +0200 |
commit | 03cdb5a152eeb58204dfcac23f64a79646bcf689 (patch) | |
tree | dc1d4b5b6b293a5d8add236bf3f574c1b3443506 /Parsers.hs | |
parent | df35f664776cbb4b588f9ee71853d2be784364fc (diff) | |
download | xmobar-03cdb5a152eeb58204dfcac23f64a79646bcf689.tar.gz xmobar-03cdb5a152eeb58204dfcac23f64a79646bcf689.tar.bz2 |
fix a few warnings, clean up some recently added stuff, and restrict parsec to <3
Ignore-this: df12dd4ab0ccec4de18b15e77a6150c484bd5ec5
Parsec 3 adds Applicative and Alternative instances which conflict
with the ones needed for version 2 (no other reasons I'm aware of
bind us to parsec-2).
darcs-hash:20090925192159-d6583-efb71dbd01a6d166fc66f8004889f020382280fc.gz
Diffstat (limited to 'Parsers.hs')
-rw-r--r-- | Parsers.hs | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- | -- Module : Xmobar.Parsers @@ -28,8 +29,7 @@ import qualified Data.Map as Map import Data.Foldable (sequenceA_) import Data.List (find,inits,tails) -import Control.Applicative.Permutation -- (atom, maybeAtom, optAtom, runPermsSep) -import Control.Monad(Monad(return), mapM_, liftM, ap) +import Control.Applicative.Permutation (optAtom, runPermsSep) import Control.Applicative hiding (many) import Control.Monad.Writer import Data.Either @@ -140,8 +140,10 @@ safeLast :: [a] -> Maybe a safeLast [] = Nothing safeLast xs = Just (last xs) -liftM9 :: (Monad m) => (a1 -> a -> a11 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> b) -> m a1 -> m a -> m a11 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m b -liftM9 fun a b c d e f g h i = fun `liftM` a `ap` b `ap` c `ap` d `ap` e `ap` f `ap` g `ap` h `ap` i +liftM9 :: (Monad m) => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> b) -> + m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m a6 -> m a7 -> m a8 -> m a9 -> m b +liftM9 fun a b c d e f g h i + = fun `liftM` a `ap` b `ap` c `ap` d `ap` e `ap` f `ap` g `ap` h `ap` i -- | Parse the config, logging a list of fields that were missing and replaced -- by the default definition. |