-
Notifications
You must be signed in to change notification settings - Fork 12
/
streaming-utils.cabal
86 lines (79 loc) · 4.04 KB
/
streaming-utils.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: streaming-utils
version: 0.2.5.0
synopsis: http, attoparsec, pipes and other utilities for the streaming libraries
description: This package includes http-client, aeson, attoparsec, zlib and pipes utilities for use with
the <http://hackage.haskell.org/package/streaming streaming> and
<http://hackage.haskell.org/package/streaming-bytestring streaming bytestring> libraries.
The modules generally closely follow similarly named modules in the pipes
\'ecosystem\', using similar function names, where possible.
.
Thus, for example, using the http client module, we might number the lines
of a remote document thus:
.
> import Streaming
> import Streaming.Prelude (with, each)
> import qualified Streaming.Prelude as S
> import Data.ByteString.Streaming.HTTP
> import qualified Data.ByteString.Streaming.Char8 as Q
>
> main = runResourceT $ do
> let output = numbers <|> Q.lines (simpleHTTP "http://lpaste.net/raw/146542")
> Q.putStrLn $ Q.unlines output
>
> numbers :: Monad m => Stream (Q.ByteString m) m ()
> numbers = with (each [1..]) $ \n -> Q.pack (each (show n ++ ". "))
> -- ["1. ", "2. " ..]
.
The memory requirements of this @Prelude@-ish program will not be
affected by the fact that, say, the third \'line\' is 10 terabytes long.
.
This package of course heaps together a number of dependencies, as it
seemed best not to spam hackage with numerous packages. If it seems
reasonable to detach some of it, please raise an issue on the github page.
.
Questions about usage can be raised as issues, or addressed to the
<https://groups.google.com/forum/#!forum/haskell-pipes pipes list>.
license: BSD3
license-file: LICENSE
author: michaelt
maintainer: chessai1996@gmail.com
-- copyright:
build-type: Simple
category: Data, Pipes, Streaming
extra-source-files: Changelog.md
cabal-version: >=1.10
stability: Experimental
homepage: https://github.com/haskell-streaming/streaming-utils
bug-reports: https://github.com/haskell-streaming/streaming-utils/issues
source-repository head
type: git
location: https://github.com/haskell-streaming/streaming-utils
library
exposed-modules: Data.Attoparsec.ByteString.Streaming
, Data.ByteString.Streaming.HTTP
, Data.ByteString.Streaming.Aeson
, Streaming.Pipes
, Streaming.Network.TCP
, Streaming.Zip
-- other-modules:
other-extensions: CPP, Trustworthy
build-depends: base >=4.8 && <5.0,
transformers >=0.4 && <0.7,
mtl >=2.2 && <2.4,
attoparsec > 0.13.0.0 && < 0.15,
streaming >= 0.2 && < 0.3,
streaming-bytestring >= 0.1 && < 0.4,
bytestring > 0.10 && < 0.13,
pipes >= 4.0 && < 4.4,
network-simple,
network,
http-client >=0.2 && <0.8,
http-client-tls,
aeson >=2.2 && <2.3,
attoparsec-aeson,
json-stream > 0.4 && < 0.5,
resourcet > 1.0 && < 1.4,
streaming-commons > 0.2 && < 0.3
pkgconfig-depends: zlib
-- hs-source-dirs:
default-language: Haskell2010