package opam-format
Format library for opam 2.0
Install
Dune Dependency
Authors
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.com>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
AAnil Madhavapeddy <anil@recoil.org>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
RRalf Treinen <ralf.treinen@pps.jussieu.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
2.0.3.tar.gz
md5=e84acfd52f578505c16dc9d21c99d17c
sha512=a0db42f67a41d9ee5f4015a153fa9133ca6a33201f7db6b8b5562bccdda45f8af5032dc9c863bd3eaeef74ba4a3e4a099556faa3d01e66b6e5cf8ebdd52244fe
doc/src/opam-format/opamFormatConfig.ml.html
Source file opamFormatConfig.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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
(**************************************************************************) (* *) (* Copyright 2015 OCamlPro *) (* *) (* All rights reserved. This file is distributed under the terms of the *) (* GNU Lesser General Public License version 2.1, with the special *) (* exception on linking described in the file LICENSE. *) (* *) (**************************************************************************) type t = { strict: bool; skip_version_checks: bool; all_parens: bool; } type 'a options_fun = ?strict:bool -> ?skip_version_checks:bool -> ?all_parens:bool -> 'a let default = { strict = false; skip_version_checks = false; all_parens = false; } let setk k t ?strict ?skip_version_checks ?all_parens = let (+) x opt = match opt with Some x -> x | None -> x in k { strict = t.strict + strict; skip_version_checks = t.skip_version_checks + skip_version_checks; all_parens = t.all_parens + all_parens; } let set t = setk (fun x () -> x) t (* Global configuration reference *) let r = ref default let update ?noop:_ = setk (fun cfg () -> r := cfg) !r let initk k = let open OpamStd.Config in setk (setk (fun c -> r := c; k)) !r ?strict:(env_bool "STRICT") ?skip_version_checks:(env_bool "SKIPVERSIONCHECKS") ?all_parens:(env_bool "ALLPARENS") let init ?noop:_ = initk (fun () -> ())
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>