@@ -0,0 +1,81 @@
1+# Using `streamly` package
2+
3+The latest stable release of the package is available
4+[on Hackage](https://hackage.haskell.org/package/streamly). You can also try
5+the latest development version
6+[from github](https://github.com/composewell/streamly).
7+
8+The default version available to you and how to pick a specific version may
9+depend on the build tool you are using. We have provided instructions to use a
10+specific version for some tools below.
11+
12+## cabal
13+
14+Make sure you have `cabal` version 2.4 or later installed and you have `ghc`
15+available in your PATH. Refresh your package list:
16+
17+```
18+$ cabal v2-update
19+```
20+
21+### hackage version in repl
22+
23+```
24+# Pick the latest version on Hackage
25+$ cabal v2-repl --build-depends streamly
26+
27+# Pick a specific version on Hackage
28+$ cabal v2-repl --build-depends streamly==0.6.1
29+```
30+
31+### github version in repl
32+
33+Create a `test` directory and create a `cabal.project` file in it as follows:
34+
35+```
36+packages: .
37+source-repository-package
38+ type: git
39+ location: https://github.com/composewell/streamly
40+ tag: master
41+```
42+
43+Create a `test.cabal` file as follows
44+
45+```
46+cabal-version: 2.4
47+name: test
48+version: 0
49+
50+library
51+ build-depends: base, streamly
52+```
53+
54+Run repl:
55+
56+```
57+$ cabal v2-repl
58+```
59+
60+### ghc
61+
62+```
63+$ cat hello.hs
64+import qualified Streamly.Prelude as S
65+
66+main = S.runStream $ S.fromListM [putStrLn "hello", putStrLn "world"]
67+```
68+
69+```
70+$ cabal v2-install streamly-0.6.1
71+$ ghc -package streamly-0.6.1 hello.hs
72+```
73+
74+### Project
75+
76+Add `streamly` to the `build-depends` section of your library/executable in
77+your `<package>.cabal` file. Appropriate version from Hackage will be picked
78+depending on the version bounds that you specify. See the `github version in
79+repl` section above for a sample `<package>.cabal` file and optionally the
80+`cabal.project` file if you want to use the development version from github in
81+your project.