on master help sign in
Update setup/usage guide for new cabal versions
74c9426Harendra Kumar
docs/User/Tutorials/setup-and-usage.md+21−3
@@ -112,7 +112,7 @@ project files:
112
112
113```
113```
114$ cd streamly-project
114$ cd streamly-project
115−$ cabal init --minimal --dependency base --dependency streamly-core
115+$ cabal init --non-interactive --minimal --dependency base --dependency streamly-core
116
116
117...
117...
118Generating app/Main.hs...
118Generating app/Main.hs...
@@ -128,8 +128,21 @@ cabal file `streamly-project.cabal`. Please see the [Cabal User
128Guide](https://www.haskell.org/cabal/users-guide/) for more information
128Guide](https://www.haskell.org/cabal/users-guide/) for more information
129on `.cabal` files.
129on `.cabal` files.
130
130
131+IMPORTANT: Because of a bug in cabal 3.8, which is fixed in cabal 3.10,
132+this does not generate a dependency on `base`, please edit the generated
133+cabal file and add `base` in the `build-depends` section:
134+
135+```
136+ build-depends: base, streamly-core
137+```
138+
131−This invocation also creates a skeletal `app/Main.hs` file which we
139+This invocation also creates a skeletal `app/Main.hs`, therefore, we can
132−will now use to write our streamly based program.
140+compile and run it right away:
141+
142+```
143+$ cabal run
144+Hello, Haskell!
145+```
133
146
134### Import `streamly` modules in the project code
147### Import `streamly` modules in the project code
135
148
@@ -165,6 +178,11 @@ To start up the GHCi REPL for your project, please use:
165```
178```
166$ cabal repl
179$ cabal repl
167...
180...
181+Ok, one module loaded.
182+ghci> main
183+1
184+2
185+3
168ghci>
186ghci>
169```
187```
170
188