json-tools 0.2.3 → 0.2.4
raw patch · 2 files changed
+21/−1 lines, 2 files
Files
- Utils.hs +18/−0
- json-tools.cabal +3/−1
+ Utils.hs view
@@ -0,0 +1,18 @@+module Utils where++import qualified Data.ByteString as S+import qualified Data.ByteString.Lazy as L++readFilesL :: [String] -> IO [L.ByteString]+readFilesL args+ | null args = fmap (:[]) L.getContents+ | otherwise = mapM file args+ where file "-" = L.getContents+ file xs = L.readFile xs++readFilesS :: [String] -> IO [S.ByteString]+readFilesS args+ | null args = fmap (:[]) S.getContents+ | otherwise = mapM file args+ where file "-" = S.getContents+ file xs = S.readFile xs
json-tools.cabal view
@@ -1,6 +1,6 @@ Name: json-tools Cabal-Version: >=1.6-Version: 0.2.3+Version: 0.2.4 License: BSD3 License-File: LICENSE Copyright: (c) Nicolas Pouillard@@ -35,6 +35,7 @@ executable json-lines main-is: json-lines.hs Build-depends: base>=3&&<5, AttoJson, bytestring+ Other-modules: Utils ghc-options: -Wall -Odph executable json-strings@@ -45,6 +46,7 @@ executable json-unlines main-is: json-unlines.hs Build-depends: base>=3&&<5, bytestring+ Other-modules: Utils ghc-options: -Wall -Odph executable json-wrap