package core

  1. Overview
  2. Docs
Industrial strength alternative to OCaml's standard library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.2.tar.gz
md5=6f07bb82d51d695ac4e76c8ac7f55902
sha512=c3c401fded188f74cf7ce6b1b07e7bc59fe18441eec602d174bfd48db13370fda986dd9f66d4ff9c26254ea2b381e7c51b366df9d2dfbf66fda281b4def3166a

doc/src/core/ref.ml.html

Source file ref.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
29
open! Import
open Base_quickcheck.Export

module T = struct
  include Base.Ref

  include (
    struct
      type 'a t = 'a ref [@@deriving bin_io ~localize, quickcheck, typerep]
    end :
      sig
        type 'a t = 'a ref [@@deriving bin_io ~localize, quickcheck, typerep]
      end
      with type 'a t := 'a t)
end

include T

module Permissioned = struct
  include T

  type ('a, -'perms) t = 'a T.t [@@deriving bin_io ~localize, sexp]

  let read_only = Fn.id
  let of_ref = Fn.id
  let to_ref = Fn.id
  let set = ( := )
  let get = ( ! )
end