hlint hack.

This commit is contained in:
Kazu Yamamoto 2014-04-21 16:12:30 +09:00
parent a1d33b39d3
commit 152b218813
3 changed files with 4 additions and 9 deletions

View File

@ -70,7 +70,7 @@ problematicPackages = [
]
attachPackageIds :: [Package] -> [PackageBaseName] -> [Package]
attachPackageIds pkgs = catMaybes . fmap (flip lookup3 pkgs)
attachPackageIds pkgs = catMaybes . fmap (`lookup3` pkgs)
lookup3 :: Eq a => a -> [(a,b,c)] -> Maybe (a,b,c)
lookup3 _ [] = Nothing

View File

@ -77,12 +77,12 @@ ppErrMsg dflag style err = ppMsg spn SevError dflag style msg ++ ext
where
spn = Gap.errorMsgSpan err
msg = errMsgShortDoc err
ext = showMsg dflag style (errMsgExtraInfo err)
ext = showPage dflag style (errMsgExtraInfo err)
ppMsg :: SrcSpan -> Severity-> DynFlags -> PprStyle -> SDoc -> String
ppMsg spn sev dflag style msg = prefix ++ cts
where
cts = showMsg dflag style msg
cts = showPage dflag style msg
defaultPrefix
| dopt Gap.dumpSplicesFlag dflag = ""
| otherwise = "Dummy:0:0:Error:"
@ -91,8 +91,3 @@ ppMsg spn sev dflag style msg = prefix ++ cts
file <- normalise <$> Gap.getSrcFile spn
let severityCaption = Gap.showSeverityCaption sev
return $ file ++ ":" ++ show line ++ ":" ++ show col ++ ":" ++ severityCaption
----------------------------------------------------------------
showMsg :: DynFlags -> PprStyle -> SDoc -> String
showMsg dflag style sdoc = showPage dflag style sdoc

View File

@ -70,7 +70,7 @@ ghcPkgListEx dbs = do
case rv of
ExitFailure val -> do
hPutStrLn stderr err
fail $ "ghc-pkg " ++ intercalate " " opts ++ " (exit " ++ show val ++ ")"
fail $ "ghc-pkg " ++ unwords opts ++ " (exit " ++ show val ++ ")"
ExitSuccess -> return ()
return $ parseGhcPkgOutput $ lines output