streamly/examples
2020-07-07 14:17:44 +05:30
..
AcidRain.hs Add "Streamly.Fold" module 2019-05-13 12:21:16 +05:30
CamelCase.hs Add write folds, fromBytes/toBytes for File module 2019-11-14 06:35:14 +05:30
CirclingSquare.hs Add "Streamly.Fold" module 2019-05-13 12:21:16 +05:30
ControlFlow.hs Fix some easy-to-make typos 2019-11-26 02:09:15 +05:30
EchoServer.hs improve Network.Socket doc and example 2020-03-05 01:22:31 +05:30
FileIOExamples.hs hold Map based operations for now 2019-11-15 03:07:06 +05:30
FileSinkServer.hs rename Unicode encode/decode ops 2019-11-04 02:54:46 +05:30
FromFileClient.hs Rename some IO APIs and update documentation 2019-11-06 01:30:55 +05:30
HandleIO.hs update the examples and add comments 2020-01-08 21:03:20 +05:30
ListDir.hs Use ahead and bimap 2020-01-21 15:16:27 +05:30
MergeSort.hs update examples and documentation 2018-12-30 22:14:51 +05:30
Rate.hs Move rate test to examples 2020-06-03 23:30:04 +05:30
README.md Move examples from Streamly module to examples dir 2018-05-04 01:28:02 +05:30
SearchQuery.hs Add "Streamly.Fold" module 2019-05-13 12:21:16 +05:30
Split.hs Add Split example to cabal file 2020-06-03 23:30:04 +05:30
WordClassifier.hs Change the signature of foldlM' to use a monadic seed. 2020-07-07 14:17:44 +05:30
WordCount.hs Make minor cosmetic review changes for #571 2020-07-07 14:17:44 +05:30

Running The Examples

Running directly using stack

You can run these examples using stack like this:

$ stack build
$ stack AcidRain.hs

Note: This method may not work for CirclingSquare.hs SDL animation example.

Build and run

Build the library with the examples flag on e.g.

stack build --flag streamly:examples
cabal new-build --flags examples

Then run the executables, for example:

stack exec AcidRain

The executable name are the same as the filenames.

Running the SDL animation example

To include the SDL examples as well build with examples-sdl flag:

stack build --flag streamly:examples-sdl
cabal new-build --flags examples-sdl

Make sure that you have the SDL OS package installed on your system and the headers are visible to Haskell build tool.

stack exec CirclingSquare