git.iko.soy/purescript-stream
on master help sign in
.gitignore+1
since splitsnapshots
unifiedsplit
@@ -6,3 +6,4 @@
6/.psc*
6/.psc*
7/.psa*
7/.psa*
8src/Main.purs
8src/Main.purs
9+.npm-debug.log*
CHANGELOG.mdnew file+28
@@ -0,0 +1,28 @@
1+<a name="0.2.0"></a>
2+# [0.2.0](https://github.com/TylorS/purescript-stream/compare/v0.1.0...v0.2.0) (2017-03-21)
3+
4+
5+### Bug Fixes
6+
7+* **Stream:** add missing filter import ([d4e1c8e](https://github.com/TylorS/purescript-stream/commit/d4e1c8e))
8+
9+
10+
11+<a name="0.1.0"></a>
12+# [0.1.0](https://github.com/TylorS/purescript-stream/compare/6b75d2f...v0.1.0) (2017-03-16)
13+
14+
15+### Bug Fixes
16+
17+* **Stream:** add missing exports ([13c18b7](https://github.com/TylorS/purescript-stream/commit/13c18b7))
18+
19+
20+### Features
21+
22+* **stream:** implement more helpers and combinators ([8e8b516](https://github.com/TylorS/purescript-stream/commit/8e8b516))
23+* **stream:** more combinators ([a50a246](https://github.com/TylorS/purescript-stream/commit/a50a246))
24+* **stream:** reimplement ([0813a54](https://github.com/TylorS/purescript-stream/commit/0813a54))
25+* **stream:** start of a stream library ([6b75d2f](https://github.com/TylorS/purescript-stream/commit/6b75d2f))
26+
27+
28+
README.mdnew file+28
@@ -0,0 +1,28 @@
1+# Purescript Stream
2+
3+> An ultra-fast reactive stream library for purescript
4+
5+## Let me have it
6+```sh
7+bower install --save purescript-stream
8+```
9+
10+## Basic usage
11+```purescript
12+module Main where
13+
14+import Prelude
15+import Control.Monad.Eff (Eff)
16+import Control.Monad.Eff.Console (CONSOLE, logShow, log)
17+import Control.Stream (STREAM, periodic, constant, scan, tapEvent, tapEnd, drain)
18+import Data.Unit (Unit)
19+
20+main :: Eff (stream :: STREAM, console :: CONSOLE) Unit
21+main = do
22+ periodic 1000.0 -- Stream Unit
23+ # constant 1 -- Stream Int
24+ # scan (+) 0 -- Stream Int
25+ # tapEvent logShow -- Perform side-effects on events
26+ # tapEnd (log "done") -- Perform a side-effect on stream completion
27+ # drain -- activate your stream
28+```
bower.json+2−1
@@ -10,7 +10,8 @@
10 "purescript-eff": "^2.0.0",
10 "purescript-eff": "^2.0.0",
11 "purescript-prelude": "^2.5.0",
11 "purescript-prelude": "^2.5.0",
12 "purescript-refs": "^2.0.0",
12 "purescript-refs": "^2.0.0",
13− "purescript-maybe": "^2.1.1"
13+ "purescript-maybe": "^2.1.1",
14+ "purescript-partial": "^1.2.0"
14 },
15 },
15 "devDependencies": {
16 "devDependencies": {
16 "purescript-console": "^2.0.0",
17 "purescript-console": "^2.0.0",
package.json+2−5
@@ -1,6 +1,6 @@
1{
1{
2− "name": "purescript-tempest",
2+ "name": "purescript-stream",
3− "version": "0.0.0",
3+ "version": "0.2.0",
4 "description": "",
4 "description": "",
5 "main": "index.js",
5 "main": "index.js",
6 "scripts": {
6 "scripts": {
@@ -34,8 +34,5 @@
34 "purescript": "^0.10.7",
34 "purescript": "^0.10.7",
35 "uglify-js": "^2.8.11",
35 "uglify-js": "^2.8.11",
36 "validate-commit-msg": "^2.11.2"
36 "validate-commit-msg": "^2.11.2"
37− },
38− "dependencies": {
39− "@most/prelude": "^1.5.0"
40 }
37 }
41}
38}
src/Control/Stream.purs+1
@@ -21,6 +21,7 @@ import Control.Stream.Stream
21 , tapEvent
21 , tapEvent
22 , tapEnd
22 , tapEnd
23 , fromArray
23 , fromArray
24+ , filter
24 , take
25 , take
25 , skip
26 , skip
26 , constant
27 , constant
src/Control/Stream/Stream.purs+1
@@ -13,6 +13,7 @@ module Control.Stream.Stream
13 , tapEvent
13 , tapEvent
14 , tapEnd
14 , tapEnd
15 , fromArray
15 , fromArray
16+ , filter
16 , take
17 , take
17 , skip
18 , skip
18 , constant
19 , constant
test/Main.pursnew file+9
@@ -0,0 +1,9 @@
1+module Test.Main where
2+
3+import Control.Monad.Eff (Eff)
4+import Control.Monad.Eff.Console (CONSOLE, logShow)
5+import Data.Unit (Unit)
6+
7+main :: Eff (console :: CONSOLE) Unit
8+main = do
9+ logShow "Write tests. You're a bad developer!"