hlint hack.
This commit is contained in:
parent
992013df05
commit
187f718de0
@ -158,7 +158,7 @@ getPackageDbPackages cdir = (getPkgDb >>= listDbPackages) `E.catch` handler
|
|||||||
listDbPackages :: FilePath -> IO [Package]
|
listDbPackages :: FilePath -> IO [Package]
|
||||||
listDbPackages pkgdir = do
|
listDbPackages pkgdir = do
|
||||||
files <- filter (".conf" `isSuffixOf`) <$> getDirectoryContents pkgdir
|
files <- filter (".conf" `isSuffixOf`) <$> getDirectoryContents pkgdir
|
||||||
mapM extractPackage $ map (pkgdir </>) files
|
mapM (extractPackage . (pkgdir </>)) files
|
||||||
|
|
||||||
extractPackage :: FilePath -> IO Package
|
extractPackage :: FilePath -> IO Package
|
||||||
extractPackage pconf = do
|
extractPackage pconf = do
|
||||||
@ -173,7 +173,7 @@ extractPackage pconf = do
|
|||||||
parseId = parse idKey
|
parseId = parse idKey
|
||||||
extractId = extract idKeyLength
|
extractId = extract idKeyLength
|
||||||
parse key = head . filter (key `isPrefixOf`)
|
parse key = head . filter (key `isPrefixOf`)
|
||||||
extract keylen = fst . break isSpace . dropWhile isSpace . drop keylen
|
extract keylen = takeWhile (not . isSpace) . dropWhile isSpace . drop keylen
|
||||||
|
|
||||||
nameKey :: String
|
nameKey :: String
|
||||||
nameKey = "name:"
|
nameKey = "name:"
|
||||||
|
@ -39,7 +39,7 @@ debug opt cradle fileName = do
|
|||||||
, "Cabal file: " ++ cabalFile
|
, "Cabal file: " ++ cabalFile
|
||||||
, "GHC options: " ++ unwords gopts
|
, "GHC options: " ++ unwords gopts
|
||||||
, "Include directories: " ++ unwords incDir
|
, "Include directories: " ++ unwords incDir
|
||||||
, "Dependent packages: " ++ (intercalate ", " $ map fst pkgs)
|
, "Dependent packages: " ++ intercalate ", " (map fst pkgs)
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
currentDir = cradleCurrentDir cradle
|
currentDir = cradleCurrentDir cradle
|
||||||
@ -68,8 +68,7 @@ root :: Options
|
|||||||
-> Cradle
|
-> Cradle
|
||||||
-> FilePath -- ^ A target file.
|
-> FilePath -- ^ A target file.
|
||||||
-> Ghc String
|
-> Ghc String
|
||||||
root _ cradle _ = do
|
root _ cradle _ = return $ rootDir ++ "\n"
|
||||||
return $ rootDir ++ "\n"
|
|
||||||
where
|
where
|
||||||
currentDir = cradleCurrentDir cradle
|
currentDir = cradleCurrentDir cradle
|
||||||
mCabalDir = cradleCabalDir cradle
|
mCabalDir = cradleCabalDir cradle
|
||||||
|
Loading…
Reference in New Issue
Block a user