cosmetic change.

This commit is contained in:
Kazu Yamamoto 2011-11-02 10:43:34 +09:00
parent fde88dedd1
commit 82e7c6862f
1 changed files with 14 additions and 14 deletions

View File

@ -1,3 +1,5 @@
{-# LANGUAGE DoAndIfThenElse #-}
module CabalDev (modifyOptions) where
{-
@ -28,18 +30,16 @@ findCabalDev =
addPath :: Options -> String -> Options
addPath orig_opts path = do
let orig_paths = packageConfs orig_opts
orig_opts {
packageConfs = orig_paths ++ [path] }
orig_opts { packageConfs = orig_paths ++ [path] }
searchIt :: [FilePath] -> IO (Maybe FilePath)
searchIt [] = return Nothing
searchIt path = do
a <- doesDirectoryExist (mpath path)
case a of
False -> return Nothing
True -> do
if a then do
b <- find always (fileName ~~? "packages*.conf") $ mpath path
maybe (searchIt $ init path) (return . Just) $ listToMaybe b
else
return Nothing
where
mpath a = (joinPath a) ++ "cabal-dev/"
mpath a = joinPath a ++ "cabal-dev/"