Fix some warnings (ghc 8)
This commit is contained in:
parent
be6ba3f875
commit
d3f66500ed
@ -62,27 +62,27 @@ import Language.Haskell.GhcMod.Gap
|
||||
import Prelude
|
||||
|
||||
debugLogAction :: (String -> IO ()) -> GmLogAction
|
||||
debugLogAction putErr dflags severity srcSpan style msg
|
||||
debugLogAction putErr dflags severity srcSpan style' msg
|
||||
= case severity of
|
||||
SevOutput -> printSDoc putErr msg style
|
||||
SevOutput -> printSDoc putErr msg style'
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 706
|
||||
SevDump -> printSDoc putErr (msg Outputable.$$ blankLine) style
|
||||
SevDump -> printSDoc putErr (msg Outputable.$$ blankLine) style'
|
||||
#endif
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 708
|
||||
SevInteractive -> let
|
||||
putStrSDoc = debugLogActionHPutStrDoc dflags putErr
|
||||
in
|
||||
putStrSDoc msg style
|
||||
putStrSDoc msg style'
|
||||
#endif
|
||||
SevInfo -> printErrs putErr msg style
|
||||
SevFatal -> printErrs putErr msg style
|
||||
SevInfo -> printErrs putErr msg style'
|
||||
SevFatal -> printErrs putErr msg style'
|
||||
_ -> do putErr "\n"
|
||||
#if __GLASGOW_HASKELL__ >= 706
|
||||
printErrs putErr (mkLocMessage severity srcSpan msg) style
|
||||
printErrs putErr (mkLocMessage severity srcSpan msg) style'
|
||||
#else
|
||||
printErrs putErr (mkLocMessage srcSpan msg) style
|
||||
printErrs putErr (mkLocMessage srcSpan msg) style'
|
||||
#endif
|
||||
-- careful (#2302): printErrs prints in UTF-8,
|
||||
-- whereas converting to string first and using
|
||||
|
@ -139,16 +139,14 @@ ppErrMsg err = do
|
||||
st = Gap.mkErrStyle' dflags unqual
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
return $ showPage dflags st msg
|
||||
where
|
||||
msg = pprLocErrMsg err
|
||||
#else
|
||||
let ext = showPage dflags st (errMsgExtraInfo err)
|
||||
m <- ppMsg st spn SevError msg
|
||||
return $ m ++ (if null ext then "" else "\n" ++ ext)
|
||||
#endif
|
||||
where
|
||||
spn = Gap.errorMsgSpan err
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
msg = pprLocErrMsg err
|
||||
#else
|
||||
msg = errMsgShortDoc err
|
||||
#endif
|
||||
|
||||
|
@ -75,12 +75,12 @@ findExecutablesInStackBinPath exe StackEnv {..} =
|
||||
|
||||
findExecutablesInDirectories' :: [FilePath] -> String -> IO [FilePath]
|
||||
findExecutablesInDirectories' path binary =
|
||||
U.findFilesWith' isExecutable path (binary <.> exeExtension)
|
||||
U.findFilesWith' isExecutable path (binary <.> exeExtension')
|
||||
where isExecutable file = do
|
||||
perms <- getPermissions file
|
||||
return $ executable perms
|
||||
|
||||
exeExtension = if isWindows then "exe" else ""
|
||||
exeExtension' = if isWindows then "exe" else ""
|
||||
|
||||
readStack :: (IOish m, GmOut m, GmLog m) => [String] -> MaybeT m String
|
||||
readStack args = do
|
||||
|
Loading…
Reference in New Issue
Block a user