From 5044cf7f56f67e7c65055dec02afbcd48dbe1527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Mon, 5 May 2014 09:43:14 +0200 Subject: [PATCH] Fix warnings --- Language/Haskell/GhcMod/CabalApi.hs | 2 ++ Language/Haskell/GhcMod/GhcPkg.hs | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Language/Haskell/GhcMod/CabalApi.hs b/Language/Haskell/GhcMod/CabalApi.hs index 322f3fd..8264a35 100644 --- a/Language/Haskell/GhcMod/CabalApi.hs +++ b/Language/Haskell/GhcMod/CabalApi.hs @@ -12,7 +12,9 @@ module Language.Haskell.GhcMod.CabalApi ( , cabalConfigDependencies ) where +#if MIN_VERSION_base(4,7,0) import Prelude hiding (catch) +#endif import Language.Haskell.GhcMod.Types import Language.Haskell.GhcMod.GhcPkg diff --git a/Language/Haskell/GhcMod/GhcPkg.hs b/Language/Haskell/GhcMod/GhcPkg.hs index 44fde2c..9a6e732 100644 --- a/Language/Haskell/GhcMod/GhcPkg.hs +++ b/Language/Haskell/GhcMod/GhcPkg.hs @@ -16,7 +16,7 @@ import Config (cProjectVersionInt,cProjectVersion,cTargetPlatformString) import DynFlags (DynFlags(..), systemPackageConfig,getDynFlags) import Exception (handleIO) import CoreMonad (liftIO) -import Control.Applicative ((<$>),(<*>),(<*),(*>)) +import Control.Applicative ((<$>),(<*>),(*>)) import Control.Exception (SomeException(..)) import Control.Monad (void) import qualified Control.Exception as E @@ -30,7 +30,7 @@ import Language.Haskell.GhcMod.Utils import {-# SOURCE #-} Language.Haskell.GhcMod.Monad import System.FilePath (()) import System.Directory (getAppUserDataDirectory,doesDirectoryExist) -import Text.ParserCombinators.ReadP (ReadP, char, satisfy, between, sepBy1, many1, many, manyTill, skipMany, skipMany1, skipSpaces, string, choice, eof,(+++)) +import Text.ParserCombinators.ReadP (ReadP, char, satisfy, between, sepBy1, many1, manyTill, skipMany, skipSpaces, string, choice) import qualified Text.ParserCombinators.ReadP as P ghcVersion :: Int @@ -133,9 +133,9 @@ ghcPkgOutputP' = do pathLineP :: ReadP FilePath pathLineP = do - p <- (:) <$> char '/' <*> manyTill (satisfy $ const True) (char ':') - char '\n' - return p + p <- (:) <$> char '/' <*> manyTill (satisfy $ const True) (char ':') + void $ char '\n' + return p data PackageState = Normal | Hidden | Broken deriving (Eq,Show) @@ -145,7 +145,7 @@ packageLineP = do p <- choice [ (Hidden,) <$> between (char '(') (char ')') packageP , (Broken,) <$> between (char '{') (char '}') packageP , (Normal,) <$> packageP ] - char '\n' + void $ char '\n' return p packageP :: ReadP (PackageBaseName, PackageVersion, PackageId)