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 :: [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 :: Eq a => a -> [(a,b,c)] -> Maybe (a,b,c)
lookup3 _ [] = Nothing lookup3 _ [] = Nothing

View File

@ -77,12 +77,12 @@ ppErrMsg dflag style err = ppMsg spn SevError dflag style msg ++ ext
where where
spn = Gap.errorMsgSpan err spn = Gap.errorMsgSpan err
msg = errMsgShortDoc err msg = errMsgShortDoc err
ext = showMsg dflag style (errMsgExtraInfo err) ext = showPage dflag style (errMsgExtraInfo err)
ppMsg :: SrcSpan -> Severity-> DynFlags -> PprStyle -> SDoc -> String ppMsg :: SrcSpan -> Severity-> DynFlags -> PprStyle -> SDoc -> String
ppMsg spn sev dflag style msg = prefix ++ cts ppMsg spn sev dflag style msg = prefix ++ cts
where where
cts = showMsg dflag style msg cts = showPage dflag style msg
defaultPrefix defaultPrefix
| dopt Gap.dumpSplicesFlag dflag = "" | dopt Gap.dumpSplicesFlag dflag = ""
| otherwise = "Dummy:0:0:Error:" | otherwise = "Dummy:0:0:Error:"
@ -91,8 +91,3 @@ ppMsg spn sev dflag style msg = prefix ++ cts
file <- normalise <$> Gap.getSrcFile spn file <- normalise <$> Gap.getSrcFile spn
let severityCaption = Gap.showSeverityCaption sev let severityCaption = Gap.showSeverityCaption sev
return $ file ++ ":" ++ show line ++ ":" ++ show col ++ ":" ++ severityCaption 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 case rv of
ExitFailure val -> do ExitFailure val -> do
hPutStrLn stderr err hPutStrLn stderr err
fail $ "ghc-pkg " ++ intercalate " " opts ++ " (exit " ++ show val ++ ")" fail $ "ghc-pkg " ++ unwords opts ++ " (exit " ++ show val ++ ")"
ExitSuccess -> return () ExitSuccess -> return ()
return $ parseGhcPkgOutput $ lines output return $ parseGhcPkgOutput $ lines output