-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d9093b
Showing
12 changed files
with
757 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_build | ||
*.native | ||
*.docdir | ||
*.install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(* This file is free software. See file "license" for more details. *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
S src | ||
B _build/src | ||
PKG lwt | ||
PKG result | ||
FLG -w +a-4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2016, Simon Cruanes | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. Redistributions in binary | ||
form must reproduce the above copyright notice, this list of conditions and | ||
the following disclaimer in the documentation and/or other materials | ||
provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
OPTS= -classic-display -use-ocamlfind | ||
TARGETS= lwt_pipe.cma lwt_pipe.cmxa lwt_pipe.cmxs lwt_pipe.a | ||
|
||
build: | ||
ocamlbuild $(OPTS) $(addprefix src/, $(TARGETS)) | ||
|
||
clean: | ||
ocamlbuild -clean | ||
|
||
install: build | ||
ocamfind install lwt_pipe src/META $(addprefix _build/src/, $(TARGETS)) _build/src/*.cmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Lwt Pipe | ||
|
||
An alternative to `Lwt_stream` with interfaces for producers and consumers | ||
and a bounded internal buffer. | ||
|
||
## Build | ||
|
||
opam install lwt_pipe | ||
|
||
or: | ||
|
||
opam pin add -k git lwt-pipe https://github.com/c-cube/lwt_pipe.git | ||
opam install lwt_pipe | ||
|
||
## Use | ||
|
||
```ocaml | ||
# #require "lwt";; | ||
# #require "lwt_pipe";; | ||
# open Lwt.Infix;; | ||
# let l = [1;2;3;4];; | ||
# Lwt_pipe.of_list l | ||
|> Lwt_pipe.Reader.map ~f:(fun x->x+1) | ||
|> Lwt_pipe.to_list;; | ||
``` | ||
|
||
## License | ||
|
||
permissive free software (BSD-2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<src>: include | ||
<src/*>: package(lwt), package(result) | ||
true: safe_string, short_paths, warn(+a-4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
opam-version: "1.2" | ||
name: "lwt_pipe" | ||
version: "dev" | ||
author: "Simon Cruanes" | ||
maintainer: "[email protected]" | ||
build: [ | ||
[make "build"] | ||
] | ||
install: [ | ||
[make "install"] | ||
] | ||
remove: [ | ||
["ocamlfind" "remove" "lwt_pipe"] | ||
] | ||
build-doc: [ make "doc" ] | ||
depends: [ | ||
"ocamlfind" {build} | ||
"ocamlbuild" {build} | ||
"result" | ||
"lwt" | ||
] | ||
tags: [ "lwt" "pipe" "stream" "blocking" ] | ||
homepage: "https://github.com/c-cube/lwt_pipe/" | ||
dev-repo: "https://github.com/c-cube/lwt_pipe.git" | ||
bug-reports: "https://github.com/c-cube/lwt_pipe/issues/" | ||
|
Oops, something went wrong.