Fix warnings

This commit is contained in:
Daniel Gröber 2014-05-05 09:43:14 +02:00
parent 81504de8bd
commit 5044cf7f56
2 changed files with 8 additions and 6 deletions

View File

@ -12,7 +12,9 @@ module Language.Haskell.GhcMod.CabalApi (
, cabalConfigDependencies , cabalConfigDependencies
) where ) where
#if MIN_VERSION_base(4,7,0)
import Prelude hiding (catch) import Prelude hiding (catch)
#endif
import Language.Haskell.GhcMod.Types import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.GhcPkg import Language.Haskell.GhcMod.GhcPkg

View File

@ -16,7 +16,7 @@ import Config (cProjectVersionInt,cProjectVersion,cTargetPlatformString)
import DynFlags (DynFlags(..), systemPackageConfig,getDynFlags) import DynFlags (DynFlags(..), systemPackageConfig,getDynFlags)
import Exception (handleIO) import Exception (handleIO)
import CoreMonad (liftIO) import CoreMonad (liftIO)
import Control.Applicative ((<$>),(<*>),(<*),(*>)) import Control.Applicative ((<$>),(<*>),(*>))
import Control.Exception (SomeException(..)) import Control.Exception (SomeException(..))
import Control.Monad (void) import Control.Monad (void)
import qualified Control.Exception as E import qualified Control.Exception as E
@ -30,7 +30,7 @@ import Language.Haskell.GhcMod.Utils
import {-# SOURCE #-} Language.Haskell.GhcMod.Monad import {-# SOURCE #-} Language.Haskell.GhcMod.Monad
import System.FilePath ((</>)) import System.FilePath ((</>))
import System.Directory (getAppUserDataDirectory,doesDirectoryExist) 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 import qualified Text.ParserCombinators.ReadP as P
ghcVersion :: Int ghcVersion :: Int
@ -134,7 +134,7 @@ ghcPkgOutputP' = do
pathLineP :: ReadP FilePath pathLineP :: ReadP FilePath
pathLineP = do pathLineP = do
p <- (:) <$> char '/' <*> manyTill (satisfy $ const True) (char ':') p <- (:) <$> char '/' <*> manyTill (satisfy $ const True) (char ':')
char '\n' void $ char '\n'
return p return p
data PackageState = Normal | Hidden | Broken deriving (Eq,Show) data PackageState = Normal | Hidden | Broken deriving (Eq,Show)
@ -145,7 +145,7 @@ packageLineP = do
p <- choice [ (Hidden,) <$> between (char '(') (char ')') packageP p <- choice [ (Hidden,) <$> between (char '(') (char ')') packageP
, (Broken,) <$> between (char '{') (char '}') packageP , (Broken,) <$> between (char '{') (char '}') packageP
, (Normal,) <$> packageP ] , (Normal,) <$> packageP ]
char '\n' void $ char '\n'
return p return p
packageP :: ReadP (PackageBaseName, PackageVersion, PackageId) packageP :: ReadP (PackageBaseName, PackageVersion, PackageId)