-
Notifications
You must be signed in to change notification settings - Fork 15
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
Showing
8 changed files
with
105 additions
and
34 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 |
---|---|---|
@@ -1,8 +1,4 @@ | ||
_b0 | ||
_build | ||
tmp | ||
*~ | ||
\#*# | ||
*.native | ||
*.byte | ||
*.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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
PKG b0.kit | ||
S src | ||
S test | ||
B _build/** | ||
B _b0/** |
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,67 @@ | ||
open B0_kit.V000 | ||
open B00_std | ||
|
||
(* OCaml library names *) | ||
|
||
let react = B0_ocaml.libname "react" | ||
let react_top = B0_ocaml.libname "react.top" | ||
|
||
let unix = B0_ocaml.libname "unix" | ||
let compiler_libs_toplevel = B0_ocaml.libname "compiler-libs.toplevel" | ||
|
||
(* Libraries *) | ||
|
||
let react_lib = | ||
let srcs = Fpath.[ `File (v "src/react.mli"); `File (v "src/react.ml") ] in | ||
let requires = [] in | ||
B0_ocaml.lib react ~doc:"The react library" ~srcs ~requires | ||
|
||
let react_top_lib = | ||
let srcs = Fpath.[ `File (v "src/react_top.ml") ] in | ||
let requires = [compiler_libs_toplevel] in | ||
let doc = "The react toplevel support library" in | ||
B0_ocaml.lib react_top ~doc ~srcs ~requires | ||
|
||
(* Tests *) | ||
|
||
let test_exe ?(requires = []) src ~doc = | ||
let src = Fpath.v src in | ||
let srcs = Fpath.[`File src] in | ||
let meta = B0_meta.(empty |> tag test) in | ||
let requires = react :: requires in | ||
B0_ocaml.exe (Fpath.basename ~no_ext:true src) ~srcs ~doc ~meta ~requires | ||
|
||
let test = test_exe "test/test.ml" ~doc:"Test suite" | ||
let clock = | ||
test_exe "test/clock.ml" ~doc:"Reactive clock example" ~requires:[unix] | ||
|
||
let breakout = | ||
test_exe "test/breakout.ml" ~doc:"Breakout game example" ~requires:[unix] | ||
|
||
(* Packs *) | ||
|
||
let default = | ||
let meta = | ||
let open B0_meta in | ||
empty | ||
|> tag B0_opam.tag | ||
|> add authors ["The react programmers"] | ||
|> add maintainers ["Daniel Bünzli <daniel.buenzl [email protected]>"] | ||
|> add homepage "https://erratique.ch/software/react" | ||
|> add online_doc "https://erratique.ch/software/react/doc/" | ||
|> add licenses ["ISC"] | ||
|> add repo "git+https://erratique.ch/repos/react.git" | ||
|> add issues "https://github.com/dbuenzli/react/issues" | ||
|> add description_tags | ||
["reactive"; "declarative"; "signal"; "event"; "frp"; "org:erratique"] | ||
|> add B0_opam.Meta.depends | ||
[ "ocaml", {|>= "4.08.0"|}; | ||
"ocamlfind", {|build|}; | ||
"ocamlbuild", {|build|}; | ||
"topkg", {|build & >= "1.0.3"|}; | ||
] | ||
|> add B0_opam.Meta.build | ||
{|[["ocaml" "pkg/pkg.ml" "build" "--dev-pkg" "%{dev}%"]]|} | ||
in | ||
B0_pack.v "default" ~doc:"react package" ~meta ~locked:true @@ | ||
B0_unit.list () |
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 @@ | ||
(srcs-x pkg) |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
React — Declarative events and signals for OCaml | ||
------------------------------------------------------------------------------- | ||
================================================ | ||
Release %%VERSION%% | ||
|
||
React is an OCaml module for functional reactive programming (FRP). It | ||
|
@@ -10,11 +10,9 @@ signal, it lets the client chooses the concrete timeline. | |
React is made of a single, independent, module and distributed under | ||
the ISC license. | ||
|
||
Home page: http://erratique.ch/software/react | ||
Contact: Daniel Bünzli `<daniel.buenzl [email protected]>` | ||
Homepage: <http://erratique.ch/software/react> | ||
|
||
|
||
## Installation | ||
# Installation | ||
|
||
React can be installed with `opam`: | ||
|
||
|
@@ -23,21 +21,19 @@ React can be installed with `opam`: | |
If you don't use `opam` consult the [`opam`](opam) file for build | ||
instructions. | ||
|
||
# Documentation | ||
|
||
## Documentation | ||
|
||
The documentation and API reference is automatically generated by | ||
`ocamldoc` from the interfaces. It can be consulted [online][3] | ||
and there is a generated version in the `doc` directory of the | ||
distribution. | ||
The documentation and API reference is automatically generated by from | ||
the source interfaces. It can be consulted [online][doc] or via `odig | ||
doc react`. | ||
|
||
[3]: http://erratique.ch/software/react/doc/React | ||
[doc]: http://erratique.ch/software/react/doc/ | ||
|
||
|
||
## Sample programs | ||
# Sample programs | ||
|
||
If you installed React with `opam` sample programs are located in | ||
the directory `opam config var react:doc`. | ||
the directory `opam var react:doc`. | ||
|
||
In the distribution sample programs are located in the `test` | ||
directory of the distribution. They can be built with: | ||
|
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
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 |
---|---|---|
@@ -1,16 +1,30 @@ | ||
opam-version: "2.0" | ||
name: "react" | ||
synopsis: "Declarative events and signals for OCaml" | ||
description: """\ | ||
Release %%VERSION%% | ||
|
||
React is an OCaml module for functional reactive programming (FRP). It | ||
provides support to program with time varying values : declarative | ||
events and signals. React doesn't define any primitive event or | ||
signal, it lets the client chooses the concrete timeline. | ||
|
||
React is made of a single, independent, module and distributed under | ||
the ISC license. | ||
|
||
Homepage: <http://erratique.ch/software/react>""" | ||
maintainer: "Daniel Bünzli <daniel.buenzl [email protected]>" | ||
authors: "The react programmers" | ||
license: "ISC" | ||
tags: ["reactive" "declarative" "signal" "event" "frp" "org:erratique"] | ||
homepage: "https://erratique.ch/software/react" | ||
authors: ["The react programmers"] | ||
doc: "https://erratique.ch/software/react/doc/React" | ||
dev-repo: "git+https://erratique.ch/repos/react.git" | ||
doc: "https://erratique.ch/software/react/doc/" | ||
bug-reports: "https://github.com/dbuenzli/react/issues" | ||
tags: [ "reactive" "declarative" "signal" "event" "frp" "org:erratique" ] | ||
license: "ISC" | ||
depends: [ | ||
"ocaml" {>= "4.08.0"} | ||
"ocamlfind" {build} | ||
"ocamlbuild" {build} | ||
"topkg" {build & >= "1.0.1"} | ||
"topkg" {build & >= "1.0.3"} | ||
] | ||
available: [ ocaml-version >= "4.05.0" ] | ||
build: [[ "ocaml" "pkg/pkg.ml" "build" "--dev-pkg" "%{pinned}%" ]] | ||
build: ["ocaml" "pkg/pkg.ml" "build" "--dev-pkg" "%{dev}%"] | ||
dev-repo: "git+https://erratique.ch/repos/react.git" |