packages feed

cab 0.0.0 → 0.0.1

raw patch · 6 files changed

+11/−9 lines, 6 files

Files

CmdDB.hs view
@@ -85,7 +85,7 @@        , document = "Display information of a package"        , routing = RouteProc "cabal" ["info"]        , options = []-       , manual = Just "<package>"+       , manual = Just "<package> [<ver>]"        }   , CommandSpec {          command = Sdist@@ -101,7 +101,7 @@        , document = "Untar a package in the current directory"        , routing = RouteProc "cabal" ["unpack"]        , options = []-       , manual = Just "<package>"+       , manual = Just "<package> [<ver>]"        }   , CommandSpec {          command = Deps
Commands.hs view
@@ -91,10 +91,10 @@              -> (Bool -> PkgDB -> Int -> PkgInfo -> IO ()) -> IO () printDepends nmver flags func = do     db' <- getPkgDB+    pkg <- lookupPkg nmver db'     db <- if allFlag flags           then return db'           else toPkgDB . flip toPkgList db' <$> userPkgs-    pkg <- lookupPkg nmver db     func (recursiveFlag flags) db 0 pkg  ----------------------------------------------------------------
Main.hs view
@@ -74,4 +74,6 @@ callProcess pro args0 args1 flags = system script >> return ()   where     opts = flagsToOptions flags-    script = joinBy " " $ pro : opts ++ args0 ++ args1+    script = joinBy " " $ pro : opts ++ args0 ++ cat args1+    cat [pkg,ver] = [pkg ++ "-" ++ ver]+    cat x         = x
PkgDB.hs view
@@ -43,7 +43,7 @@ ----------------------------------------------------------------  lookupByName :: String -> PkgDB -> [PkgInfo]-lookupByName name db = map (head . snd) $ lookupPackageName db (PackageName name)+lookupByName name db = concatMap snd $ lookupPackageName db (PackageName name)  lookupByVersion :: String -> String -> PkgDB -> [PkgInfo] lookupByVersion name ver db = lookupSourcePackageId db src@@ -66,8 +66,8 @@     -- drop "/."     userDirPref <- takeDirectory <$> getAppUserDataDirectory ""     return $ \pkgi -> case libraryDirs pkgi of-        []   -> False -- haskell-platform for example-        x:_ -> userDirPref `isPrefixOf` x+        [] -> False -- haskell-platform for example+        xs -> any (userDirPref `isPrefixOf`) xs  allPkgs :: IO (PkgInfo -> Bool) allPkgs = return (const True)
Program.hs view
@@ -1,7 +1,7 @@ module Program where  version :: String-version = "0.0.0"+version = "0.0.1"  programName :: String programName = "cab"
cab.cabal view
@@ -1,5 +1,5 @@ Name:                   cab-Version:                0.0.0+Version:                0.0.1 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3