[Pkg-haskell-commits] darcs: haskell-hoogle: Add addlocation option to hoogle, for injecting location infomation.
kiwamu at debian.or.jp
kiwamu at debian.or.jp
Thu Oct 11 15:53:55 UTC 2012
Thu Oct 11 15:50:39 UTC 2012 kiwamu at debian.or.jp
* Add addlocation option to hoogle, for injecting location infomation.
Ignore-this: 6ed59d4479c3ad9e52761d17dc65fd81
M ./files_hoogle/update-hoogle -1 +1
A ./patches/add-local-loction-database.patch
M ./patches/series +1
Thu Oct 11 15:50:39 UTC 2012 kiwamu at debian.or.jp
* Add addlocation option to hoogle, for injecting location infomation.
Ignore-this: 6ed59d4479c3ad9e52761d17dc65fd81
diff -rN -u old-haskell-hoogle//files_hoogle/update-hoogle new-haskell-hoogle//files_hoogle/update-hoogle
--- old-haskell-hoogle//files_hoogle/update-hoogle 2012-10-11 15:53:55.262235683 +0000
+++ new-haskell-hoogle//files_hoogle/update-hoogle 2012-10-11 15:53:55.270222187 +0000
@@ -27,7 +27,7 @@
TXTFILES=`readlinks $TXTFILES_SYM`
for i in $TXTFILES; do
echo -n "."
- $HOOGLE convert $i $DATABASE_DIR/`basename $i`.hoo >/dev/null 2>&1
+ $HOOGLE convert $i $DATABASE_DIR/`basename $i`.hoo --addlocation >/dev/null 2>&1
done
echo " done"
diff -rN -u old-haskell-hoogle//patches/add-local-loction-database.patch new-haskell-hoogle//patches/add-local-loction-database.patch
--- old-haskell-hoogle//patches/add-local-loction-database.patch 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hoogle//patches/add-local-loction-database.patch 2012-10-11 15:53:55.278222868 +0000
@@ -0,0 +1,62 @@
+Index: haskell-hoogle-4.2.10/src/CmdLine/Type.hs
+===================================================================
+--- haskell-hoogle-4.2.10.orig/src/CmdLine/Type.hs 2012-09-13 09:59:22.839204283 +0900
++++ haskell-hoogle-4.2.10/src/CmdLine/Type.hs 2012-10-12 00:42:15.267088185 +0900
+@@ -34,7 +34,7 @@
+ | Data {redownload :: Bool, local :: [String], datadir :: FilePath, threads :: Int, actions :: [String]}
+ | Server {port :: Int, local_ :: Bool, databases :: [FilePath], resources :: FilePath, dynamic :: Bool, template :: [FilePath]}
+ | Combine {srcfiles :: [FilePath], outfile :: String}
+- | Convert {srcfile :: String, outfile :: String}
++ | Convert {srcfile :: String, outfile :: String, addlocation :: Bool}
+ | Log {logfiles :: [FilePath]}
+ | Test {testFiles :: [String], example :: Bool}
+ | Dump {database :: String, section :: [String]}
+@@ -92,6 +92,7 @@
+ convert = Convert
+ {srcfile = def &= argPos 0 &= typ "INPUT"
+ ,outfile = def &= argPos 1 &= typ "DATABASE" &= opt ""
++ ,addlocation = def &= help "Add location infomation to database"
+ } &= help "Convert an input file to a database"
+
+ data_ = Data
+Index: haskell-hoogle-4.2.10/src/Console/All.hs
+===================================================================
+--- haskell-hoogle-4.2.10.orig/src/Console/All.hs 2012-09-13 09:59:22.839204283 +0900
++++ haskell-hoogle-4.2.10/src/Console/All.hs 2012-10-12 00:43:26.363440741 +0900
+@@ -3,6 +3,7 @@
+
+ import CmdLine.All
+ import Recipe.All
++import Recipe.Hackage
+ import Console.Log
+ import Console.Search
+ import Console.Test
+@@ -36,12 +37,15 @@
+
+ action (Log files) = logFiles files
+
+-action (Convert from to) = do
++action (Convert from to addloc) = do
+ to <- return $ if null to then replaceExtension from "hoo" else to
+ when (any isUpper $ takeBaseName to) $ putStrLn $ "Warning: Hoogle databases should be all lower case, " ++ takeBaseName to
+ putStrLn $ "Converting " ++ from
+ src <- readFileUtf8 from
+- let (err,db) = createDatabase Haskell [] src
++ let from' = "file:/" ++ from
++ src' = if addloc then unlines . haddockPackageUrl from' . lines $ src
++ else src
++ (err,db) = createDatabase Haskell [] src'
+ unless (null err) $ putStr $ unlines $ "Warning: parse errors" : map show err
+ saveDatabase to db
+ putStrLn $ "Written " ++ to
+Index: haskell-hoogle-4.2.10/src/Recipe/Hackage.hs
+===================================================================
+--- haskell-hoogle-4.2.10.orig/src/Recipe/Hackage.hs 2012-09-13 09:59:22.839204283 +0900
++++ haskell-hoogle-4.2.10/src/Recipe/Hackage.hs 2012-10-12 00:42:15.271088200 +0900
+@@ -1,5 +1,5 @@
+
+-module Recipe.Hackage(makePlatform, makeDefault, makePackage, makeAll) where
++module Recipe.Hackage(makePlatform, makeDefault, makePackage, makeAll, haddockPackageUrl) where
+
+ import Recipe.Type
+ import Recipe.Cabal
diff -rN -u old-haskell-hoogle//patches/series new-haskell-hoogle//patches/series
--- old-haskell-hoogle//patches/series 2012-10-11 15:53:55.262235683 +0000
+++ new-haskell-hoogle//patches/series 2012-10-11 15:53:55.278222868 +0000
@@ -2,3 +2,4 @@
cgi-use-template-file-always.patch
ad-hoc-extend-depend-4-2-10.patch
cgi-return-res-files.patch
+add-local-loction-database.patch
More information about the Pkg-haskell-commits
mailing list