xls 0.1.0 → 0.1.1
raw patch · 7 files changed
+26/−26 lines, 7 filesdep ~basedep ~conduitdep ~resourcetPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, conduit, resourcet
API changes (from Hackage documentation)
- Data.Xls: decodeXls :: MonadResource m => FilePath -> Producer m [String]
+ Data.Xls: decodeXls :: MonadResource m => FilePath -> ConduitM i [String] m ()
Files
- Changelog.md +7/−0
- README.md +2/−3
- bin/xls2csv.hs +2/−1
- lib/Data/Xls.hs +4/−4
- stack-7.8.yaml +0/−8
- stack.yaml +1/−1
- xls.cabal +10/−9
+ Changelog.md view
@@ -0,0 +1,7 @@+## 0.1.1++* Upgrade dependencies++## 0.1.0++* Initial release
README.md view
@@ -1,5 +1,6 @@ ## Haskell xls Parsing +[](https://hackage.haskell.org/package/xls) [](https://travis-ci.org/harendra-kumar/xls) [](https://ci.appveyor.com/project/harendra-kumar/xls) @@ -22,9 +23,7 @@ ``` An `xls2csv` utility is shipped with the package.-See the [haddock-documentation](https://rawgit.com/harendra-kumar/xls/master/doc/index.html)-for the API details.+See the haddock documentation for API details. ## Under the hood The library is based on the C library libxls, see
bin/xls2csv.hs view
@@ -14,7 +14,8 @@ xlsToCSV :: String -> IO () xlsToCSV file = runResourceT+ $ runConduit $ decodeXls file- $$ CL.mapM_ (liftIO . putStrLn . intercalate ",")+ .| CL.mapM_ (liftIO . putStrLn . intercalate ",") main = withCli xlsToCSV
lib/Data/Xls.hs view
@@ -85,7 +85,7 @@ -- -- Throws 'XlsException' ---decodeXls :: MonadResource m => FilePath -> Producer m [String]+decodeXls :: MonadResource m => FilePath -> ConduitM i [String] m () decodeXls file = bracketP alloc cleanup decodeWorkSheets where@@ -106,7 +106,7 @@ decodeOneWorkSheet :: MonadResource m- => FilePath -> XLSWorkbook -> CInt -> Producer m [String]+ => FilePath -> XLSWorkbook -> CInt -> ConduitM i [String] m () decodeOneWorkSheet file pWB index = bracketP alloc cleanup decodeWS where@@ -123,7 +123,7 @@ decodeWS = decodeRows -decodeRows :: MonadResource m => XLSWorksheet -> Producer m [String]+decodeRows :: MonadResource m => XLSWorksheet -> ConduitM i [String] m () decodeRows pWS = do rows <- liftIO $ c_xls_ws_rowcount pWS cols <- liftIO $ c_xls_ws_colcount pWS@@ -131,7 +131,7 @@ decodeOneRow :: MonadResource m- => XLSWorksheet -> Int16 -> Int16 -> Producer m [String]+ => XLSWorksheet -> Int16 -> Int16 -> ConduitM i [String] m () decodeOneRow pWS cols rowindex = mapM (liftIO . (c_xls_cell pWS rowindex)) [0 .. cols - 1] >>= mapM (liftIO. decodeOneCell)
− stack-7.8.yaml
@@ -1,8 +0,0 @@-flags: {}-packages:-- '.'-extra-deps:-- base-compat-0.9.1-- base-orphans-0.5.4-- getopt-generics-0.13-resolver: lts-2.22
stack.yaml view
@@ -1,3 +1,3 @@-resolver: lts-6.16+resolver: lts-10.4 packages: - '.'
xls.cabal view
@@ -1,5 +1,5 @@ name: xls-version: 0.1.0+version: 0.1.1 synopsis: Parse Microsoft Excel xls files (BIFF/Excel 97-2004) description: Parse Microsoft Excel spreadsheet files in @.xls@ file format@@ -22,9 +22,9 @@ cabal-version: >=1.10 extra-source-files:+ Changelog.md README.md stack.yaml- stack-7.8.yaml lib/libxls/config/*.h lib/libxls/include/libxls/*.h lib/libxls/include/libxls/*.c.h@@ -47,10 +47,10 @@ hs-source-dirs: lib exposed-modules: Data.Xls- build-depends: base >= 4 && < 5- , conduit >= 1.1 && < 1.3+ build-depends: base >= 4.7 && < 5+ , conduit >= 1.1 && < 1.4 , filepath >= 1.0 && < 1.5- , resourcet >= 0.3 && < 1.2+ , resourcet >= 0.3 && < 1.3 , transformers >= 0.1 && < 0.6 c-sources: lib/libxls-wrapper.c,@@ -67,9 +67,9 @@ hs-source-dirs: bin main-is: xls2csv.hs ghc-options: -threaded -rtsopts -with-rtsopts=-N- build-depends: base >= 4 && < 5- , conduit >= 1.1 && < 1.3- , resourcet >= 0.3 && < 1.2+ build-depends: base >= 4.7 && < 5+ , conduit >= 1.1 && < 1.4+ , resourcet >= 0.3 && < 1.3 , transformers >= 0.1 && < 0.6 , getopt-generics >= 0.11 && < 0.14 , xls@@ -79,7 +79,8 @@ type: exitcode-stdio-1.0 hs-source-dirs: test main-is: Spec.hs- build-depends: base, xls+ build-depends: base >= 4.7 && < 5+ , xls ghc-options: -threaded -rtsopts -with-rtsopts=-N source-repository head