diff --git a/Adelie/Colour.hs b/Adelie/Colour.hs
--- a/Adelie/Colour.hs
+++ b/Adelie/Colour.hs
@@ -37,7 +37,7 @@
     else putChar '\n'
 
 whenM :: IO Bool -> IO () -> IO ()
-whenM cond f = cond >>= (flip when f)
+whenM cond f = cond >>= flip when f
 
 ----------------------------------------------------------------
 
diff --git a/Adelie/Contents.hs b/Adelie/Contents.hs
--- a/Adelie/Contents.hs
+++ b/Adelie/Contents.hs
@@ -70,9 +70,9 @@
 ----------------------------------------------------------------
 
 contentsParser :: String -> Contents
-contentsParser ('d':'i':'r':' ':dir) = (Dir dir)
+contentsParser ('d':'i':'r':' ':dir) = Dir dir
 
-contentsParser ('o':'b':'j':' ':ln0) = (Obj obj md5 time)
+contentsParser ('o':'b':'j':' ':ln0) = Obj obj md5 time
   where ln1 = dropWhile isSpace $ reverse ln0
         (time', ln2) = break2 (not.isDigit) ln1
         (md5', obj') = break2 (not.isHexDigit) ln2
@@ -80,7 +80,7 @@
         md5  = reverse md5'
         time = digitsToInt (reverse time')
 
-contentsParser ('s':'y':'m':' ':ln0) = (Sym link target time)
+contentsParser ('s':'y':'m':' ':ln0) = Sym link target time
   where (link, ln1) = breakLink ln0
         ln2 = reverse ln1
         (time', target') = break2 (not.isDigit) ln2
diff --git a/Adelie/Depend.hs b/Adelie/Depend.hs
--- a/Adelie/Depend.hs
+++ b/Adelie/Depend.hs
@@ -1,7 +1,7 @@
 -- Depend.hs
 --
 -- Module for parsing DEPEND and RDEPEND files, located in
--- portageDB/cateogry/package/.
+-- portageDB/category/package/.
 
 module Adelie.Depend (
   Version,
@@ -12,8 +12,9 @@
   putDependency
 ) where
 
-import Data.Char (isSpace)
+import qualified Data.Char as C
 import Data.List (nub)
+import qualified Debug.Trace as DT
 import Text.ParserCombinators.Parsec
 import Text.ParserCombinators.Parsec.Language
 import Text.ParserCombinators.Parsec.Token
@@ -24,11 +25,14 @@
 type Version = String
 
 data Dependency
-  = GreaterEqual  String Version
-  | Equal         String Version
-  | Unstable      String Version
-  | NotInstalled  String
-  | Any           String
+  = GreaterEqual  String Version -- '>=c/p-v'
+  | Greater       String Version -- '>c/p-v'
+  | Equal         String Version -- '=c/p-v*'
+  | LessEqual     String Version -- '<=c/p-v'
+  | Less          String Version -- '<c/p-v'
+  | Pinned        String Version -- '~c/p-v'
+  | Blocker       String         -- '!c/p-v'
+  | Any           String         -- 'c/p'
     deriving (Eq, Show)
 
 ----------------------------------------------------------------
@@ -40,7 +44,7 @@
 
 readDepend :: FilePath -> [String] -> IO [Dependency]
 readDepend fn iUse = do
-  r <- (start_parser fn) `E.catchIOE` (\ _ -> return $ Right [])
+  r <- start_parser fn `E.catchIOE` (\ _ -> return $ Right [])
   case r of
     Left err -> putStr "Parse error at " >> print err >> error "Aborting"
     Right x  -> return $ nub x
@@ -50,9 +54,12 @@
 
 putDependency :: Dependency -> IO ()
 putDependency (GreaterEqual p v) = putStr $ ">=" ++ p ++ '-':v
-putDependency (Equal p v)        = putStr $ '=':p ++ '-':v
-putDependency (Unstable p v)     = putStr $ '~':p ++ '-':v
-putDependency (NotInstalled p)   = putStr $ '!':p
+putDependency (Greater p v)      = putStr $ ">"  ++ p ++ '-':v
+putDependency (Equal p v)        = putStr $ "="  ++ p ++ '-':v
+putDependency (LessEqual p v)    = putStr $ "<=" ++ p ++ '-':v
+putDependency (Less p v)         = putStr $ "<"  ++ p ++ '-':v
+putDependency (Pinned p v)       = putStr $ "~"  ++ p ++ '-':v
+putDependency (Blocker p)        = putStr $ "!"  ++ p
 putDependency (Any p)            = putStr p
 
 ----------------------------------------------------------------
@@ -71,20 +78,17 @@
          <|> parsePackageOrUse iUse
 
 parseOr :: [String] -> Parser [Dependency]
-parseOr iUse = do { string "||"
-                  ; spaces
-                  ; parseBrackets iUse
-                  }
+parseOr iUse = (string "||" >> spaces >> parseBrackets iUse)
              <|>
-                parseBrackets iUse
+               parseBrackets iUse
 
 parsePackageOrUse :: [String] -> Parser [Dependency]
 parsePackageOrUse iUse =
   do { p <- parsePackageOrUseWord
-     ; do { char '?'        -- useFlag
+     ; do { _ <- char '?'        -- useFlag
           ; spaces
           ; r <- parseBrackets iUse
-          ; let filt | head p == '!' = not $ (tail p) `elem` iUse
+          ; let filt | head p == '!' = not $ tail p `elem` iUse
                      | otherwise     = p `elem` iUse
           ; if filt
               then return r
@@ -97,22 +101,20 @@
 parsePackageOrUseWord = do { result <- many1 (satisfy cond)
                            -- skip[use]
                            -- TODO: add it to output
-                           ; optionMaybe (do { char '['
-                                             ; _use <- many1 (satisfy (/= ']'))
-                                             ; char ']'
-                                             -- ; return use
-                                             ; return ()
-                                             })
+                           ; _ <- optionMaybe (do { _use <- between (char '[') (char ']') $ many1 (satisfy (/= ']'))
+                                               -- ; return use
+                                               ; return ()
+                                               })
                            ; return result
                            }
   where
     cond '?' = False
     cond ')' = False
     cond '[' = False
-    cond x = not $ isSpace x
+    cond x = not $ C.isSpace x
 
 parseBrackets :: [String] -> Parser [Dependency]
-parseBrackets iUse = do { char '('
+parseBrackets iUse = do { _ <- char '('
                         ; spaces
                         ; r <- manyTill (dependParser' iUse) (try (char ')'))
                         ; return $ concat r
@@ -126,16 +128,39 @@
         v = drop (length n+1) str
 
 toDependency :: String -> Dependency
+toDependency s =
+    case s of
+        ('>':'=':str) ->
+            let (n, v) = breakVersion str
+            in GreaterEqual n v
 
-toDependency ('>':'=':str) = (GreaterEqual n v)
-  where (n, v) = breakVersion str
+        ('>':str) ->
+            let (n, v) = breakVersion str
+            in Greater n v
 
-toDependency ('=':str) = (Equal n v)
-  where (n, v) = breakVersion str
+        ('=':str) ->
+            let (n, v) = breakVersion str
+            in Equal n v
 
-toDependency ('~':str) = (Unstable n v)
-  where (n, v) = breakVersion str
+        ('<':'=':str) ->
+            let (n, v) = breakVersion str
+            in LessEqual n v
 
-toDependency ('!':n) = (NotInstalled n)
+        ('<':str) ->
+            let (n, v) = breakVersion str
+            in Less n v
 
-toDependency n = (Any n)
+        -- TODO: can be any atom expression
+        ('~':str) ->
+            let (n, v) = breakVersion str
+            in Pinned n v
+
+        -- TODO: can be any atom expression
+        ('!':n) ->
+            Blocker n
+
+        n@(c:_) | C.isAlpha c ->
+            Any n
+
+        n -> DT.trace ("FIXME: unknown atom type: " ++ show n) $
+            Any n
diff --git a/Adelie/Error.hs b/Adelie/Error.hs
--- a/Adelie/Error.hs
+++ b/Adelie/Error.hs
@@ -6,7 +6,7 @@
     , bracket
 ) where
 
-import qualified Control.Exception.Extensible as E
+import qualified Control.Exception as E
 
 try :: IO a -> IO (Either E.SomeException a)
 try = E.try
diff --git a/Adelie/FileEx.hs b/Adelie/FileEx.hs
new file mode 100644
--- /dev/null
+++ b/Adelie/FileEx.hs
@@ -0,0 +1,73 @@
+module Adelie.FileEx where
+
+import Control.Monad
+import Data.Char
+import Data.List
+import System.Directory
+
+
+type FileExt = String
+type Line    = String
+
+
+-- |Remove all non-directories from a list of FilePaths.
+noDirs :: IO [FilePath] -> IO [FilePath]
+noDirs ioFps = filterM doesFileExist =<< ioFps
+
+
+concatPath :: [String] -> String
+concatPath = intercalate "/"
+
+
+addPathPrefix :: FilePath -> IO [FilePath] -> IO [FilePath]
+addPathPrefix prefix ioFps = do
+  fps <- ioFps
+  return (fmap (\x -> concatPath [prefix, x]) fps)
+
+
+-- |Rm all commentary lines of a file content.
+rmComments :: String -> String
+rmComments =
+  rmTrailingNewline
+  . unlines
+  . rmCommentsL
+  . lines
+
+
+-- |Same as 'rmComments', but on a list of lines.
+rmCommentsL :: [Line] -> [Line]
+rmCommentsL = filter (not . isComment)
+
+
+-- |Rm all blank lines.
+rmBlank :: String -> String
+rmBlank =
+  rmTrailingNewline
+  . unlines
+  . rmBlankL
+  . lines
+
+
+-- |Same as 'rmBlank', but on a list of lines.
+rmBlankL :: [Line] -> [Line]
+rmBlankL = filter (not . isBlank)
+
+
+-- |Whether the line is a comment.
+isComment :: Line -> Bool
+isComment = iC' . dropWhile isSpace
+  where
+    iC' ('#':_) = True
+    iC' _       = False
+
+
+-- |Whether the line is blank (only spaces or tabs).
+isBlank :: Line -> Bool
+isBlank = null . dropWhile isSpace
+
+
+-- |Removes a trailing newline.
+rmTrailingNewline :: String -> String
+rmTrailingNewline [] = []
+rmTrailingNewline [x, '\n'] = [x]
+rmTrailingNewline (x:xs)    = x : rmTrailingNewline xs
diff --git a/Adelie/ListEx.hs b/Adelie/ListEx.hs
--- a/Adelie/ListEx.hs
+++ b/Adelie/ListEx.hs
@@ -2,15 +2,7 @@
 --
 -- Extra list functions.
 
-module Adelie.ListEx (
-  break2,
-  concatMapM,
-  digitsToInt,
-  dropTail,
-  dropUntilAfter,
-  foldMUntil,
-  pad
-) where
+module Adelie.ListEx where
 
 import Data.Char (digitToInt)
 import Data.List (foldl')
@@ -38,9 +30,12 @@
 foldMUntil _ _ a [] = return a
 foldMUntil f g a (x:xs) = do
   a' <- f a x
-  case g a' of
-    True  -> return a'
-    False -> foldMUntil f g a' xs
+  if g a'
+    then return a'
+    else foldMUntil f g a' xs
 
 pad :: Int -> a -> [a] -> [a]
 pad n a str = take n (str ++ repeat a)
+
+addPrefix :: [a] -> [[a]] -> [[a]]
+addPrefix = map . (++)
diff --git a/Adelie/Portage.hs b/Adelie/Portage.hs
--- a/Adelie/Portage.hs
+++ b/Adelie/Portage.hs
@@ -7,6 +7,7 @@
   portageDB,
   useDesc,
   useDescPackage,
+  useExpDescDir,
 
   dropVersion,
   concatPath,
@@ -17,9 +18,10 @@
 
 import Data.Char         (isDigit)
 import System.Directory  (getDirectoryContents, doesDirectoryExist)
-import Data.List         (intersperse, sort)
+import Data.List         (sort)
 import Control.Monad     (liftM)
 
+import Adelie.FileEx
 import Adelie.ListEx
 import Adelie.Config
 
@@ -43,17 +45,18 @@
 useDescPackage :: String
 useDescPackage = portageProfiles ++ "/use.local.desc"
 
+-- Where the USE Expand descriptions are.
+useExpDescDir :: String
+useExpDescDir = portageProfiles ++ "/desc"
+
 ----------------------------------------------------------------
 
 dropVersion :: String -> String
 dropVersion [] = []
 dropVersion ('-':x:xs)
   | isDigit x = []
-  | otherwise = '-':x:(dropVersion xs)
-dropVersion (x:xs) = x:(dropVersion xs)
-
-concatPath :: [String] -> String
-concatPath = concat.intersperse "/"
+  | otherwise = '-':x:dropVersion xs
+dropVersion (x:xs) = x:dropVersion xs
 
 fullnameFromCatName :: (String, String) -> String
 fullnameFromCatName (cat, name) = cat ++ '/':name
diff --git a/Adelie/Provide.hs b/Adelie/Provide.hs
--- a/Adelie/Provide.hs
+++ b/Adelie/Provide.hs
@@ -20,4 +20,4 @@
 ----------------------------------------------------------------
 
 readProvide :: FilePath -> IO [String]
-readProvide fn = (liftM words (readFile fn)) `E.catchIOE` (\ _ -> return [])
+readProvide fn = liftM words (readFile fn) `E.catchIOE` (\ _ -> return [])
diff --git a/Adelie/QChangelog.hs b/Adelie/QChangelog.hs
--- a/Adelie/QChangelog.hs
+++ b/Adelie/QChangelog.hs
@@ -23,7 +23,7 @@
 
 logFile :: (String, String) -> String
 logFile (cat, name) = 
-  portageTree ++ '/':cat ++ '/':(dropVersion name) ++ "/ChangeLog"
+  portageTree ++ '/':cat ++ '/':dropVersion name ++ "/ChangeLog"
 
 ----------------------------------------------------------------
 
@@ -140,7 +140,7 @@
       putFiles 76 (f:files)
     else do
       cyan
-      if (last f == ',')
+      if last f == ','
         then putStr (dropTail 1 f) >> off >> putStr ", "
         else putStr f >> off >> putChar ' '
       putFiles (rem' - len - 1) files
@@ -155,7 +155,7 @@
   case bug of
     [] -> putChar '#' >> putBody cs
     _  -> inMagenta (putStr ('#':bug)) >> putBody cs
-  where (bug, cs) = span (isDigitOrSpace) c0
+  where (bug, cs) = span isDigitOrSpace c0
 
 putBody (c:cs) = putChar c >> putBody cs
 
diff --git a/Adelie/QCheck.hs b/Adelie/QCheck.hs
--- a/Adelie/QCheck.hs
+++ b/Adelie/QCheck.hs
@@ -45,11 +45,11 @@
       return (False, (g, b+1))
     Right _stat -> do
       (rd, wr) <- createPipeHandle
-      runMD5sum o (Just wr) >>= waitForProcess
+      _ <- runMD5sum o (Just wr) >>= waitForProcess
       ln <- hGetLine rd
       hClose rd
       hClose wr
-      if m == (takeWhile isHexDigit ln)
+      if m == takeWhile isHexDigit ln
         then return (False, (g+1, b))
         else putMD5error o >> return (False, (g, b+1))
 
diff --git a/Adelie/QDepend.hs b/Adelie/QDepend.hs
--- a/Adelie/QDepend.hs
+++ b/Adelie/QDepend.hs
@@ -13,6 +13,8 @@
 import Adelie.Provide
 import Adelie.Use
 
+import Data.Function
+
 ----------------------------------------------------------------
 
 qDepend :: [String] -> IO ()
@@ -54,21 +56,41 @@
   where n = dropVersion str
         v = drop (length n+1) str
 
+-- leave only version part without :SLOT/SUBSLOT part:
+--   "0.3:0/0.2.2=" -> 0.3
+unslot :: String -> String
+unslot = takeWhile (`notElem` ":/=")
+
+cvu :: String -> String -> Ordering
+cvu = compareVersion `on` unslot
+
 satisfiedBy :: Dependency -> String -> Bool
 
 (GreaterEqual wantName wantVer) `satisfiedBy` provided =
-  (wantName == provName) && (compareVersion provVer wantVer) /= LT
+  (wantName == provName) && cvu provVer wantVer /= LT
   where (provName, provVer) = breakVersion provided
 
+(Greater wantName wantVer) `satisfiedBy` provided =
+  (wantName == provName) && cvu provVer wantVer == GT
+  where (provName, provVer) = breakVersion provided
+
 (Equal wantName wantVer) `satisfiedBy` provided = 
-  (wantName == provName) && (compareVersion provVer wantVer) == EQ
+  (wantName == provName) && cvu provVer wantVer == EQ
   where (provName, provVer) = breakVersion provided
 
-(Unstable wantName wantVer) `satisfiedBy` provided =
-  (wantName == provName) && (compareVersion provVer wantVer) == EQ
+(LessEqual wantName wantVer) `satisfiedBy` provided =
+  (wantName == provName) && cvu provVer wantVer /= GT
   where (provName, provVer) = breakVersion provided
 
-(NotInstalled _) `satisfiedBy` _ = False
+(Less wantName wantVer) `satisfiedBy` provided =
+  (wantName == provName) && cvu provVer wantVer == LT
+  where (provName, provVer) = breakVersion provided
+
+(Pinned wantName wantVer) `satisfiedBy` provided =
+  (wantName == provName) && cvu provVer wantVer == EQ
+  where (provName, provVer) = breakVersion provided
+
+(Blocker _) `satisfiedBy` _ = False
 
 (Any wantName) `satisfiedBy` provided =
   wantName == provName
diff --git a/Adelie/QOwn.hs b/Adelie/QOwn.hs
--- a/Adelie/QOwn.hs
+++ b/Adelie/QOwn.hs
@@ -21,7 +21,7 @@
 qOwn :: [String] -> IO ()
 qOwn [] = return ()
 qOwn args = do
-  foldMUntil qOwn' null args =<< allInstalledPackages
+  _ <- foldMUntil qOwn' null args =<< allInstalledPackages
   putChar '\n'
 
 qOwn' :: [String] -> (String, String) -> IO [String]
diff --git a/Adelie/QUse.hs b/Adelie/QUse.hs
--- a/Adelie/QUse.hs
+++ b/Adelie/QUse.hs
@@ -24,45 +24,55 @@
 qUse' catnames = do
   useDesc' <- readUseDesc
   useDescPackage' <- readUseDescPackage min' max'
-  mapM_ (use useDesc' useDescPackage') catnames
+  useDescExpand'  <- readUseExpDesc
+  mapM_ (use useDesc' useDescPackage' useDescExpand') catnames
   where min' = dropVersion $ fullnameFromCatName $ minimum catnames
         max' = dropVersion $ fullnameFromCatName $ maximum catnames
 
-use :: UseDescriptions -> UseDescriptions -> (String, String) -> IO ()
-use useDesc' useDescPackage' catname = do
+use :: UseDescriptions -> UseDescriptions -> UseDescriptions
+    -> (String, String) -> IO ()
+use useDesc' useDescPackage' useDescExpand' catname = do
   iUse <- readIUse fnIUse
   pUse <- readUse  fnPUse
-  let len = maximum $ map length iUse
-  use' catname len useDesc' useDescPackage' iUse pUse
+  let iUse' = fmap stripUse iUse
+      len   = maximum $ map length iUse'
+  use' catname len useDesc' useDescPackage' useDescExpand' iUse' pUse
   where fnIUse = iUseFromCatName catname
         fnPUse = useFromCatName catname
 
-use' :: (String, String) -> Int -> UseDescriptions -> UseDescriptions ->
-        [String] -> [String] -> IO ()
-
-use' catname _ _ _ [] _ = putStr "No USE flags for " >> putCatNameLn catname
-use' catname len useDesc' useDescPackage' iUse pUse = do
+use' :: (String, String) -> Int -> UseDescriptions -> UseDescriptions
+     -> UseDescriptions -> [String] -> [String] -> IO ()
+use' catname _ _ _ _ [] _ = putStr "No USE flags for " >> putCatNameLn catname
+use' catname len useDesc' useDescPackage' useDescExpand' iUse pUse = do
   putStr "USE flags for " >> putCatNameLn catname
-  mapM_ (format len useDesc' useDescPackage' pUse) iUse
+  mapM_ (format len useDesc' useDescPackage' useDescExpand' pUse) iUse
   putChar '\n'
 
+
+-- |Strip prefixed '+' and '-' settings from a USE flag string.
+stripUse :: String -> String
+stripUse ('-':xs) = xs
+stripUse ('+':xs) = xs
+stripUse xs       = xs
+
+
 ----------------------------------------------------------------
 
-format :: Int -> UseDescriptions -> UseDescriptions ->
-          [String] -> String -> IO ()
+format :: Int -> UseDescriptions -> UseDescriptions
+       -> UseDescriptions -> [String] -> String -> IO ()
 
-format len useDesc' useDescPackage' pUse iUse =
+format len useDesc' useDescPackage' useDescExpand' pUse iUse =
   inst >> putStr (pad len ' ' iUse) >> off >> putStr " : " >> desc
   where
     inst = if iUse `elem` pUse
             then putStr " + " >> red
             else putStr "   " >> blue
 
-    desc = do
-      end <- desc' useDescPackage'
-      unless end (do
-        end' <- desc' useDesc'
-        unless end' (putStrLn "<< no description >>"))
+    desc =
+      desc' useDescExpand'    >>= \x -> unless x
+        $ desc' useDescPackage' >>= \y -> unless y
+          $ desc' useDesc'        >>= \z -> unless z
+            $ putStrLn "<< no description >>"
 
     desc' descs = do
       r <- HT.lookup descs iUse
diff --git a/Adelie/UseDesc.hs b/Adelie/UseDesc.hs
--- a/Adelie/UseDesc.hs
+++ b/Adelie/UseDesc.hs
@@ -5,7 +5,8 @@
 module Adelie.UseDesc (
   UseDescriptions,
   readUseDesc,
-  readUseDescPackage
+  readUseDescPackage,
+  readUseExpDesc
 ) where
 
 import Data.Char (isSpace)
@@ -13,8 +14,12 @@
 import Control.Monad (when)
 
 import Adelie.ListEx
+import Adelie.FileEx
 import Adelie.Portage
 
+import System.Directory
+import System.FilePath.Posix (takeBaseName, splitExtension)
+
 type UseDescriptions = HT.BasicHashTable String String
 
 ----------------------------------------------------------------
@@ -55,7 +60,7 @@
 useParser2 :: UseDescriptions -> String -> String -> String -> IO Bool
 useParser2 _ _ _ [] = return True
 useParser2 _ _ _ ('#':_) = return True
-useParser2 table start end str = do
+useParser2 table start end str =
   case mid start catname end of
       LT -> return True
       EQ -> HT.insert table use desc >> return True
@@ -63,9 +68,40 @@
   where str' = reverse $ dropWhile isSpace $ reverse str
         (catname, rest) = break2 (':' ==) str'
         (use, desc) = myBreak rest
-  
+
 ----------------------------------------------------------------
 
+readUseExpDesc :: IO UseDescriptions
+readUseExpDesc = do
+  table <- HT.new
+  files <- noDirs
+           . addPathPrefix useExpDescDir
+           . getDirectoryContents
+           $ useExpDescDir
+  fileContents <- mapM (\fp -> fmap
+                         (unexpandUse fp . rmBlank . rmComments)
+                         (readFile fp))
+                       files
+  mapM_ (useParser table) (lines . concat $ fileContents)
+  return table
+
+-- |Use expand descriptions don't contain the first part of the USE
+-- flag in the files, so 'libreoffice_extensions_nlpsolver - desc'
+-- is actually 'nlpsolver - desc'.
+-- We have to fix that.
+unexpandUse :: FilePath -- ^ the file the Use desc is part of
+            -> String   -- ^ the file contents, with comments etc removed
+            -> String   -- ^ the fixed file contents
+unexpandUse fp fc =
+  unlines
+  . addPrefix (flip (++) "_" . noExt . takeBaseName $ fp)
+  . lines
+  $ fc
+  where
+    noExt = fst . splitExtension
+
+----------------------------------------------------------------
+
 -- In Haskell, vim-core > vim
 -- In sort,    vim-core < vim
 -- Work around it.
@@ -75,7 +111,7 @@
 myCompare []  _ = GT
 myCompare (a:as) (b:bs) =
   if r == EQ
-    then myCompare as bs 
+    then myCompare as bs
     else r
   where r = compare a b
 
diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -26,64 +26,64 @@
 
 logCommands :: [Command]
 logCommands = [
-  (Long   "c" "changes"
+  Long   "c" "changes"
           "list changes since the installed version"
-          qChangelog),
-  (Short  "cl"
+          qChangelog,
+  Short  "cl"
           "find the changelog of a package"
-          qLogFile)
+          qLogFile
   ]
 
 listCommands :: [Command]
 listCommands = [
-  (Long   "f" "files"
+  Long   "f" "files"
           "list the contents of a package"
-          (qList ListAll)),
-  (Short  "fd"
+          (qList ListAll),
+  Short  "fd"
           "list the directories in a package"
-          (qList ListDirs)),
-  (Short  "ff"
+          (qList ListDirs),
+  Short  "ff"
           "list the files in a package"
-          (qList ListFiles)),
-  (Short  "fl"
+          (qList ListFiles),
+  Short  "fl"
           "list the links in a package"
-          (qList ListLinks))
+          (qList ListLinks)
   ]
 
 ownCommands :: [Command]
 ownCommands = [
-  (Long   "b" "belongs"
+  Long   "b" "belongs"
           "find the package(s) owning a file"
-          qOwn),
-  (Short  "bp"
+          qOwn,
+  Short  "bp"
           "find the package(s) owning a file with regexp"
-          qOwnRegex),
-  (Long   "s" "size"
+          qOwnRegex,
+  Long   "s" "size"
           "find the size of files in a package"
-          qSize),
-  (Long   "k" "check"
+          qSize,
+  Long   "k" "check"
           "check MD5sums and timestamps of a package"
-          qCheck)
+          qCheck
   ]
 
 dependCommands :: [Command]
 dependCommands = [
-  (Long   "d" "depends"
+  Long   "d" "depends"
           "list packages directly depending on this package"
-          qDepend),
-  (Short  "dd"
+          qDepend,
+  Short  "dd"
           "list direct dependencies of a package"
-          qWant)
+          qWant
   ]
 
 useCommands :: [Command]
 useCommands = [
-  (Long   "u" "uses"
+  Long   "u" "uses"
           "describe a package's USE flags"
-          qUse),
-  (Long   "h" "hasuse"
+          qUse,
+  Long   "h" "hasuse"
           "list all packages with a USE flag"
-          qHasUse)
+          qHasUse
   ]
 
 allCommands :: [Command]
@@ -98,7 +98,7 @@
   mapM_ parseOptions options
   case commands of
     [] -> usage
-    (cmd:cargs) -> (runCommand cmd allCommands) cargs
+    cmd:cargs -> runCommand cmd allCommands cargs
 
 
 isOption :: String -> Bool
@@ -118,13 +118,13 @@
 ----------------------------------------------------------------
 
 runCommand :: String -> [Command] -> CommandProc
-runCommand _ [] = (\ _ -> usage)
+runCommand _ [] = \ _ -> usage
 
-runCommand command ((Short cmd _ f):cs)
+runCommand command (Short cmd _ f:cs)
   | command == cmd  = f
   | otherwise       = runCommand command cs
 
-runCommand command ((Long cmd0 cmd1 _ f):cs)
+runCommand command (Long cmd0 cmd1 _ f:cs)
   | command == cmd0 = f
   | command == cmd1 = f
   | otherwise       = runCommand command cs
diff --git a/fquery.cabal b/fquery.cabal
--- a/fquery.cabal
+++ b/fquery.cabal
@@ -1,9 +1,9 @@
 Name:          fquery
-Version:       0.2.1.5
+Version:       0.2.2
 
 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
+Copyright:     2006 David Wang, 2009-2016 Sergei Trofimovich
 
 License-File:  LICENCE.txt
 License:       OtherLicense
@@ -32,6 +32,7 @@
         Adelie.Contents
         Adelie.Depend
         Adelie.Error
+        Adelie.FileEx
         Adelie.ListEx
         Adelie.Options
         Adelie.Portage
@@ -54,9 +55,9 @@
     C-Sources: Adelie/opts.c
 
     Build-Depends:
-        base >= 2 && < 5,
+        base >= 4 && < 5,
         directory,
-        extensible-exceptions,
+        filepath,
         hashtables,
         parsec,
         process,
@@ -65,4 +66,4 @@
 
 Source-Repository head
   type:     git
-  location: git://repo.or.cz/fquery.git
+  location: git://github.com/gentoo-haskell/fquery.git
