[Pkg-haskell-commits] darcs: haskell-devscripts: Remove haddock-collect again
Joachim Breitner
mail at joachim-breitner.de
Mon Oct 8 19:16:21 UTC 2012
Mon Oct 8 19:12:47 UTC 2012 Joachim Breitner <mail at joachim-breitner.de>
* Remove haddock-collect again
Ignore-this: 5238acaa2944ef06c265f8f758c05086
R ./haddock-collect
R ./haddock-collect.pod
Mon Oct 8 19:12:47 UTC 2012 Joachim Breitner <mail at joachim-breitner.de>
* Remove haddock-collect again
Ignore-this: 5238acaa2944ef06c265f8f758c05086
diff -rN -u old-haskell-devscripts//haddock-collect new-haskell-devscripts//haddock-collect
--- old-haskell-devscripts//haddock-collect 2012-10-08 19:16:21.150733974 +0000
+++ new-haskell-devscripts//haddock-collect 1970-01-01 00:00:00.000000000 +0000
@@ -1,36 +0,0 @@
-#!/usr/bin/runhaskell
-{-# OPTIONS -Wall #-}
-
-import Data.List
-import Data.Maybe
-import System.Environment
-import System.FilePath
-
-type URL = String
-
--- copy from hoogle/src/Recipe/Hackage.hs
-haddockPackageUrl :: URL -> [String] -> [String]
-haddockPackageUrl x = concatMap f
- where f y | "@package " `isPrefixOf` y = ["@url " ++ x, y]
- | otherwise = [y]
--- copy end
-
-filterHaddock :: URL -> String -> String
-filterHaddock url = unlines . haddockPackageUrl url . lines
-
-readAndPrint :: FilePath -> FilePath -> FilePath -> IO ()
-readAndPrint strip outdir file = do
- f <- readFile file
- writeFile outfile $ filterHaddock url f
- where outfile = outdir </> takeFileName file
- url = normalise $ "file:/" ++ (fromMaybe "" . stripPrefix strip . dropFileName $ file)
-
-usage :: IO ()
-usage = putStrLn "Usage: echo SOMEWHERE/HOOGLE_DATABASE.txt | haddock-collect STRIP OUTDIR"
-
-main :: IO ()
-main = do
- a <- getArgs
- if a == [] || a == ["-h"] || length a /= 2 then usage
- else do c <- getContents
- mapM_ (readAndPrint (a !! 0) (a !! 1)) (lines c)
diff -rN -u old-haskell-devscripts//haddock-collect.pod new-haskell-devscripts//haddock-collect.pod
--- old-haskell-devscripts//haddock-collect.pod 2012-10-08 19:16:21.150733974 +0000
+++ new-haskell-devscripts//haddock-collect.pod 1970-01-01 00:00:00.000000000 +0000
@@ -1,23 +0,0 @@
-=head1 NAME
-
-haddock-collect - add location line to hoogle txt database
-
-=head1 SYNOPSIS
-
-B<haddock-collect> S<I<string_strip_path>> S<I<output_dir>>
-
-=head1 DESCRIPTION
-
-haddock-collect is a program that helps to add location line to hoogle txt database.
-
-This script takes STDIN to find hoogle txt database filenames, and put each files with location line on output_dir.
-This script is called from hlibrary.mk, if haskell packages are built.
-
-=head1 SEE ALSO
-
-L<hoogle(1)>
-L<haddock(1)>
-
-=head1 AUTHOR
-
-Kiwamu Okabe <kiwamu at debian.or.jp>
More information about the Pkg-haskell-commits
mailing list