on 57fad21 help sign in
streamly/examples/README.md
44 lines 849 B history raw
1# Running The Examples
3## Running directly using stack
4You can run these examples using `stack` like this:
6```
7$ stack build
8$ stack AcidRain.hs
9```
11Note: This method may not work for `CirclingSquare.hs` SDL animation example.
13## Build and run
15Build the library with the `examples` flag on e.g.
17```
18stack build --flag streamly:examples
19cabal new-build --flags examples
20```
22Then run the executables, for example:
24```
25stack exec AcidRain
26```
28The executable name are the same as the filenames.
30## Running the SDL animation example
32To include the SDL examples as well build with `examples-sdl` flag:
34```
35stack build --flag streamly:examples-sdl
36cabal new-build --flags examples-sdl
37```
39Make sure that you have the SDL OS package installed on your system and the
40headers are visible to Haskell build tool.
42```
43stack exec CirclingSquare
44```