packages feed

fquery 0.2.1.2 → 0.2.1.3

raw patch · 18 files changed

+107/−80 lines, 18 filesdep +extensible-exceptionsdep −haskell98

Dependencies added: extensible-exceptions

Dependencies removed: haskell98

Files

Adelie/Colour.hs view
@@ -15,7 +15,7 @@     off2 ) where -import Monad (when)+import Control.Monad (when)  import Adelie.Options 
Adelie/CompareVersion.hs view
@@ -4,7 +4,7 @@  module Adelie.CompareVersion (compareVersion) where -import Char (isDigit)+import Data.Char (isDigit)  import Adelie.ListEx (digitsToInt) 
Adelie/Contents.hs view
@@ -11,8 +11,9 @@   readContents ) where -import Char (isDigit, isHexDigit, isSpace)-import IO+import Data.Char (isDigit, isHexDigit, isSpace)+import qualified Adelie.Error as E+import System.IO  import Adelie.Colour import Adelie.ListEx@@ -33,15 +34,15 @@  readContents :: (Contents -> a -> IO (Bool, a)) -> FilePath -> a -> IO a readContents f fn a = do-  r <- try read'+  r <- E.try read'   case r of     Left  _  -> return a     Right a' -> return a'   where     read' =-      bracket (openFile fn ReadMode)-              hClose-              (readContents' f a)+      E.bracket (openFile fn ReadMode)+                hClose+                (readContents' f a)  readContents' :: (Contents -> a -> IO (Bool, a)) -> a -> Handle -> IO a readContents' f a fp = do
+ Adelie/Error.hs view
@@ -0,0 +1,15 @@+-- Module to wrap all exception code+-- TODO: distinct different kinds of error in own datatype++module Adelie.Error+    ( try+    , bracket+) where++import qualified Control.Exception.Extensible as E++try :: IO a -> IO (Either E.SomeException a)+try = E.try++bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c+bracket = E.bracket
Adelie/ListEx.hs view
@@ -12,9 +12,9 @@   pad ) where -import Char       (digitToInt)-import Data.List  (foldl')-import Monad      (liftM)+import Data.Char (digitToInt)+import Data.List (foldl')+import Control.Monad (liftM)  ---------------------------------------------------------------- 
Adelie/Options.hs view
@@ -1,5 +1,4 @@-{-# OPTIONS -fglasgow-exts #-}-+{-# LANGUAGE ForeignFunctionInterface #-} -- Options.hs -- -- We keep some globals in C so we don't have to pass them around everywhere.
Adelie/Provide.hs view
@@ -7,7 +7,7 @@   readProvide ) where -import Monad (liftM)+import Control.Monad (liftM)  import Adelie.Portage 
Adelie/QChangelog.hs view
@@ -7,8 +7,8 @@   qLogFile ) where -import Char   (isDigit, isSpace)-import Monad  (unless)+import Data.Char (isDigit, isSpace)+import Control.Monad (unless)  import Adelie.Colour import Adelie.CompareVersion
Adelie/QCheck.hs view
@@ -4,8 +4,8 @@  module Adelie.QCheck (qCheck) where -import Char               (isHexDigit)-import IO+import Data.Char          (isHexDigit)+import System.IO  import System.Process     (runProcess, waitForProcess, ProcessHandle) import System.Posix.Files (getFileStatus)@@ -13,6 +13,7 @@  import Adelie.Colour import Adelie.Contents+import qualified Adelie.Error as E import Adelie.Portage import Adelie.Pretty @@ -37,7 +38,7 @@ check' (Dir _) (g, b) = return (False, (g+1, b))  check' (Obj o m _) (g, b) = do-  r <- try (getFileStatus o)+  r <- E.try (getFileStatus o)   case r of     Left _e -> do       inRed (putStr "!!! ") >> putStr o >> putStrLn " does not exist"
Adelie/QHasUse.hs view
@@ -4,7 +4,7 @@  module Adelie.QHasUse (qHasUse) where -import Monad (when)+import Control.Monad (when)  import Adelie.Colour import Adelie.Portage
Adelie/QOwn.hs view
@@ -7,8 +7,8 @@   qOwnRegex ) where -import List       (delete)-import Monad      (when)+import Data.List (delete)+import Control.Monad (when) import Text.Regex (Regex, matchRegex, mkRegex)  import Adelie.Contents
Adelie/QSize.hs view
@@ -4,14 +4,14 @@  module Adelie.QSize (qSize) where -import Directory            (doesDirectoryExist)-import IO                   (try)-import Monad                (mapM_, when)+import System.Directory     (doesDirectoryExist)+import Control.Monad        (when) import System.Posix.Files   (fileSize, getFileStatus) import System.Posix.Types   (FileOffset)  import Adelie.Colour import Adelie.Contents+import qualified Adelie.Error as E import Adelie.Portage import Adelie.Pretty @@ -48,7 +48,7 @@     else return (False, (s,w,x,y,z+1))   count (Obj o _ _) (s,w,x,y,z) = do-  r <- try (getFileStatus o)+  r <- E.try (getFileStatus o)   case r of     Left _err -> return (False, (s, w, x, y, z+1))     Right st -> return (False, (s+fileSize st, w, x+1, y, z))
Adelie/QUse.hs view
@@ -5,7 +5,7 @@ module Adelie.QUse (qUse) where  import Data.HashTable as HashTable-import Monad (mapM_, unless)+import Control.Monad (unless)  import Adelie.Colour import Adelie.ListEx
Adelie/Use.hs view
@@ -10,8 +10,8 @@   readIUse ) where -import List   (nub, sort)-import Monad  (liftM)+import Data.List (nub, sort)+import Control.Monad (liftM)  import Adelie.Portage 
Adelie/UseDesc.hs view
@@ -8,9 +8,9 @@   readUseDescPackage ) where -import Char (isSpace)+import Data.Char (isSpace) import Data.HashTable as HashTable-import Monad (when)+import Control.Monad (when)  import Adelie.ListEx import Adelie.Portage
Main.hs view
@@ -4,7 +4,7 @@  module Main (main) where -import System (getArgs, getProgName)+import System.Environment (getArgs, getProgName)  import Adelie.Colour import Adelie.Options
TODO view
@@ -1,4 +1,4 @@  * make fquery a drop-in replacement of equery:-    o outpout compatible-    o options full- * explore attoparsec in search of faster performance+    o output compatible+    o option complete+ * explore attoparsec/alex in search of faster performance
fquery.cabal view
@@ -1,55 +1,66 @@-Name:		fquery-Version:	0.2.1.2+Name:          fquery+Version:       0.2.1.3 -Author:		David Wang <millimillenary@gmail.com>, Sergei Trofimovich <slyfox@inbox.ru>-Maintainer:	Sergei Trofimovich <slyfox@inbox.ru>-Copyright:	2006 David Wang, 2009 Sergei Trofimovich+Author:        David Wang <millimillenary@gmail.com>, Sergei Trofimovich <slyfox@inbox.ru>+Maintainer:    Sergei Trofimovich <slyfox@inbox.ru>+Copyright:     2006 David Wang, 2009-2011 Sergei Trofimovich -License-File:	LICENCE.txt-License:	OtherLicense+License-File:  LICENCE.txt+License:       OtherLicense -Synopsis:	Installed package query tool for Gentoo Linux-Description:	Installed package query tool for Gentoo Linux-		.-		Home page <http://home.exetel.com.au/tjaden/fquery/>-		.-		Public repository is at <http://repo.or.cz/w/fquery.git>+Synopsis:      Installed package query tool for Gentoo Linux+Description:   Installed package query tool for Gentoo Linux+               .+               Home page <http://home.exetel.com.au/tjaden/fquery/>+Category:      Gentoo -Category:	Gentoo+Build-Type:    Configure+Cabal-Version: >=1.6 -Build-Type:	Configure-Build-Depends:	base >= 2 && < 5, haskell98, parsec, unix, regex-compat, process, directory  Extra-Source-Files:-		configure-		Adelie/Config.hs.in-		Adelie/opts.h-		TODO+        configure+        Adelie/Config.hs.in+        Adelie/opts.h+        TODO -Executable:	fquery-Main-is:	Main.hs-Other-Modules:	Adelie.Colour-		Adelie.CompareVersion-		Adelie.Contents-		Adelie.Depend-		Adelie.ListEx-		Adelie.Options-		Adelie.Portage-		Adelie.Pretty-		Adelie.Provide-		Adelie.QChangelog-		Adelie.QCheck-		Adelie.QDepend-		Adelie.QHasUse-		Adelie.QList-		Adelie.QOwn-		Adelie.QSize-		Adelie.QUse-		Adelie.QWant-		Adelie.Use-		Adelie.UseDesc+Executable fquery+    Main-is: Main.hs+    Other-Modules:+        Adelie.Colour+        Adelie.CompareVersion+        Adelie.Contents+        Adelie.Depend+        Adelie.Error+        Adelie.ListEx+        Adelie.Options+        Adelie.Portage+        Adelie.Pretty+        Adelie.Provide+        Adelie.QChangelog+        Adelie.QCheck+        Adelie.QDepend+        Adelie.QHasUse+        Adelie.QList+        Adelie.QOwn+        Adelie.QSize+        Adelie.QUse+        Adelie.QWant+        Adelie.Use+        Adelie.UseDesc+    GHC-Options: -O2 -Wall+    -- GHC-Options: -Werror+    C-Sources: Adelie/opts.c -GHC-Options:	-O2 -Wall--- GHC-Options:	-Werror+    Build-Depends:+        base >= 2 && < 5,+        directory,+        extensible-exceptions,+        parsec,+        process,+        regex-compat,+        unix -c-sources:	Adelie/opts.c+Source-Repository head+  type:     git+  location: git://repo.or.cz/fquery.git