package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

Dune Dependency

Authors

Maintainers

Sources

bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303

doc/src/bonsai.test/import.ml.html

Source file import.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
open! Core
open Bonsai.Let_syntax

module Effect = struct
  include Ui_effect

  module External = Define (struct
      module Action = String

      let handle str = printf "External event: %s\n" str
    end)

  let sequence l = Many l
  let no_op = Ignore
  let external_ = External.inject
end

module Incr = Ui_incr
include Expect_test_helpers_core

let dummy_source_code_position =
  Source_code_position.
    { pos_fname = "file_name.ml"; pos_lnum = 0; pos_bol = 0; pos_cnum = 0 }
;;

let opaque_const x = Bonsai.read (Bonsai.Var.value (Bonsai.Var.create x))
let opaque_const_value x = Bonsai.Var.value (Bonsai.Var.create x)
let opaque_computation c = if%sub opaque_const_value true then c else assert false
OCaml

Innovation. Community. Security.