git.iko.soy/purescript-stream
on master help sign in
8 files changed+72−6
since splitsnapshots
unifiedsplit
.gitignore+1 CHANGELOG.md+28 README.md+28 bower.json+2−1 package.json+2−5 src/Control/Stream.purs+1 src/Control/Stream/Stream.purs+1 test/Main.purs+9
.gitignore+1
@@ -6,3 +6,4 @@
66/.psc*
77/.psa*
88src/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 @@
1010 "purescript-eff": "^2.0.0",
1111 "purescript-prelude": "^2.5.0",
1212 "purescript-refs": "^2.0.0",
13− "purescript-maybe": "^2.1.1"
13+ "purescript-maybe": "^2.1.1",
14+ "purescript-partial": "^1.2.0"
1415 },
1516 "devDependencies": {
1617 "purescript-console": "^2.0.0",
package.json+2−5
@@ -1,6 +1,6 @@
11{
2− "name": "purescript-tempest",
3− "version": "0.0.0",
2+ "name": "purescript-stream",
3+ "version": "0.2.0",
44 "description": "",
55 "main": "index.js",
66 "scripts": {
@@ -34,8 +34,5 @@
3434 "purescript": "^0.10.7",
3535 "uglify-js": "^2.8.11",
3636 "validate-commit-msg": "^2.11.2"
37− },
38− "dependencies": {
39− "@most/prelude": "^1.5.0"
4037 }
4138}
src/Control/Stream.purs+1
@@ -21,6 +21,7 @@ import Control.Stream.Stream
2121 , tapEvent
2222 , tapEnd
2323 , fromArray
24+ , filter
2425 , take
2526 , skip
2627 , constant
src/Control/Stream/Stream.purs+1
@@ -13,6 +13,7 @@ module Control.Stream.Stream
1313 , tapEvent
1414 , tapEnd
1515 , fromArray
16+ , filter
1617 , take
1718 , skip
1819 , 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!"