packages feed

dash-haskell 1.1.0.0 → 1.1.0.1

raw patch · 4 files changed

+16/−25 lines, 4 filesdep −bytestringdep −mtldep −process

Dependencies removed: bytestring, mtl, process, system-fileio

Files

README.md view
@@ -45,7 +45,7 @@  ```dash-haskell parsec-3.1.5 ``` -builds ```docsets/parsec-3.1.5.docset``` using the default db ordering (global, sandbox, user). +builds ```docsets/parsec-3.1.5.docset``` using the default db ordering (global, user).   Note: haddock documentation for the package must first be built prior to calling dash-haskell on it, e.g. ```@@ -59,7 +59,7 @@ Summary ======= ```-dash-haskell v1.1.0.0, a dash docset construction tool for Haskell packages+dash-haskell v1.1.0.1, a dash docset construction tool for Haskell packages  Usage: dash-haskell [-o|--output <dir>] [-q|--quiet] [-c|--cabal <file.cabal>]                     [-x|--cabal-excludes ghc,lens..] [-s|--sandbox]
dash-haskell.cabal view
@@ -1,5 +1,5 @@ name:                dash-haskell-version:             1.1.0.0+version:             1.1.0.1 synopsis:            Convert package Haddock to Dash docsets (IDE docs) homepage:            http://www.github.com/jfeltz/dash-haskell Bug-reports:         https://github.com/jfeltz/dash-haskell/issues@@ -35,9 +35,8 @@   .   >$ dash-haskell -c foo.cabal -s   .           -  builds all packages listed as dependencies in the cabal file using atleast the cabal sandbox db-  .-  using the default db ordering (global, sandbox, user).+  builds all packages listed as dependencies in the cabal file, using the+  default db ordering (global, sandbox, user).   .   Note: haddock documentation for the package must first be built prior to calling dash-haskell on it, e.g.   .@@ -75,19 +74,15 @@    build-depends:  Cabal                  >= 1.18.0                   , base                 >= 4.7 && <= 4.9-                  , bytestring           >= 0.10.0.1                   , containers           >= 0.5.5.1-                  , direct-sqlite >= 2.3.13+                  , direct-sqlite        >= 2.3.13                   , directory            >= 1.2.1.0                   , either               >= 4.3                   , filepath             >= 1.4.0.0                   , ghc                  >= 7.10.1-                  , mtl                  >= 2.1.3.1                   , optparse-applicative >= 0.11.0.1                   , pipes                >= 4.1.0-                  , process              >= 1.2.0.0                   , sqlite-simple        >= 0.4.5.0-                  , system-fileio        >= 0.3.12 && < 0.4.0                   , tagsoup              >= 0.12.7                   , text                 >= 0.7.1                   , transformers         >= 0.2 && < 0.5
src/Main.hs view
@@ -45,6 +45,6 @@   where     parserInfo :: ParserInfo O.Options    parserInfo = info (helper <*> O.parser)  $-     header "dash-haskell v1.1.0.0, a dash docset construction tool for Haskell packages"+     header "dash-haskell v1.1.0.1, a dash docset construction tool for Haskell packages"      <> progDesc "additional help is available with \"dash-haskell help <topic|option>\""      <> footer "http://www.github.com/jfeltz/dash-haskell (C) John P. Feltz 2014, 2015"
src/Pipe/FileSystem.hs view
@@ -4,12 +4,9 @@ module Pipe.FileSystem where import           Control.Monad import           Control.Monad.M-import qualified Data.ByteString as BS-import           Data.ByteString.Char8 (unpack, pack) import qualified Data.List as L import           Data.String.Util import qualified Data.Text as T-import           Data.Text.Encoding import           Database.SQLite.Simple import           System.FilePath import           PackageConf@@ -24,8 +21,8 @@  -- TODO the utility of some of these fields is still unclear to me, -- at the moment they are filled simply to satisfy the docset spec.-plist :: String -> BS.ByteString-plist str = pack . unlines $+plist :: String -> String +plist str = unlines $   [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"   , "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">"   , "<plist version=\"1.0\">"@@ -142,7 +139,7 @@         Right . TagOpen "a" $ ("href", url') : preserved   pipe_htmlConvert :: -  Ghc.PackageKey -> PipeM FilePath (FilePath, Maybe BS.ByteString) ()+  Ghc.PackageKey -> PipeM FilePath (FilePath, Maybe String) () pipe_htmlConvert p =    forever $ do     src <- await@@ -150,15 +147,15 @@       then           yield (src, Nothing)       else do -        buf <- T.pack <$> liftIO (readFile src)+        buf <- liftIO . readFile $ src         -- Link conversion errors are non-fatal.-        case mapM (convertLink p src) . parseTags $ buf of+        case mapM (convertLink p src) . parseTags $ T.pack buf of           Left e -> do              lift . warning $                preposition "failed to convert links" "for" "file" src [e]             yield (src, Nothing)            Right tags ->-            yield (src, Just . encodeUtf8 . renderTags $ tags) +            yield (src, Just . T.unpack . renderTags $ tags)   -- | This consumes a doc file and copies it to a path in 'dstRoot'.  -- By pre-condition: @@ -166,8 +163,7 @@ -- By post-condition:  --   written dst is the difference of path and src_root, --   with by the concatenation of dst_root as it's parent. -cons_writeFile :: -  FilePath -> FilePath -> ConsumerM (FilePath, Maybe BS.ByteString) () +cons_writeFile :: FilePath -> FilePath -> ConsumerM (FilePath, Maybe String) ()  cons_writeFile src_root dst_root = forever $ do    (path, buf) <- await   dst_relative_path <- lift . fromE $ stripPrefix src_root path @@ -183,7 +179,7 @@     D.createDirectoryIfMissing True $ parent dst_path      case buf of        Nothing   -> D.copyFile path dst_path -      Just buf' -> writeFile dst_path $ unpack buf'+      Just buf' -> writeFile dst_path buf'    cons_writeFiles :: FilePath -> ConsumerM PackageConf () cons_writeFiles docsets_root = forever $ do@@ -210,7 +206,7 @@   --    putStrLn "running haddock indexes"   --    runHaddockIndex (interfaceFile conf) dst_doc_root   lift . indentM 2 $ msg "writing plist.."-  liftIO . writeFile (dst_root </> "Contents/Info.plist") . unpack . plist . +  liftIO . writeFile (dst_root </> "Contents/Info.plist") . plist .      Ghc.packageKeyString . pkg $ conf     let db_path = dst_root </> "Contents/Resources/docSet.dsidx"