package monolith
A framework for testing a library using afl-fuzz
Install
Dune Dependency
Authors
Maintainers
Sources
archive.tar.gz
md5=69c351419c24fc48f45164d7c053795b
sha512=1012f468fb3f199fe2ba8ddc8f1ec74a6bb634f5dca76b1df33cbe12e7ab627e25d48b23aa4d9d376f5185a0ea85ab35ff0e6a190a0ae125466aa26557fc21b3
doc/src/monolith/GlobalState.ml.html
Source file GlobalState.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
(******************************************************************************) (* *) (* Monolith *) (* *) (* François Pottier *) (* *) (* Copyright Inria. All rights reserved. This file is distributed under the *) (* terms of the GNU Lesser General Public License as published by the Free *) (* Software Foundation, either version 3 of the License, or (at your *) (* option) any later version, as described in the file LICENSE. *) (* *) (******************************************************************************) (* Before [save()] has been called, we maintain a list of [save] functions that have been registered with us. When [save()] is called, we apply each of them to one argument, so we obtain a list of [reset] functions, which we store. When [reset()] is called, we invoke each of these functions. *) type status = | BeforeSaving of (unit -> unit -> unit) list | AfterSaving of (unit -> unit) list let status = ref (BeforeSaving []) let register save = match !status with | BeforeSaving saves -> status := BeforeSaving (save :: saves) | AfterSaving _ -> (* [register] after [save] has no effect. *) () let call f = f() let save () = match !status with | BeforeSaving saves -> status := AfterSaving (List.map call saves) | AfterSaving _ -> assert false (* protocol violation *) let reset () = match !status with | BeforeSaving _ -> assert false (* protocol violation *) | AfterSaving resets -> List.iter call resets let register_ref r = register (fun () -> let snapshot = !r in fun () -> r := snapshot )
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>