1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556(**************************************************************************)(* *)(* 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. *)(* *)(**************************************************************************)typet={strict:bool;skip_version_checks:bool;all_parens:bool;}type'aoptions_fun=?strict:bool->?skip_version_checks:bool->?all_parens:bool->'aletdefault={strict=false;skip_version_checks=false;all_parens=false;}letsetkkt?strict?skip_version_checks?all_parens=let(+)xopt=matchoptwithSomex->x|None->xink{strict=t.strict+strict;skip_version_checks=t.skip_version_checks+skip_version_checks;all_parens=t.all_parens+all_parens;}letsett=setk(funx()->x)t(* Global configuration reference *)letr=refdefaultletupdate?noop:_=setk(funcfg()->r:=cfg)!rletinitkk=letopenOpamStd.Configinsetk(setk(func->r:=c;k))!r?strict:(env_bool"STRICT")?skip_version_checks:(env_bool"SKIPVERSIONCHECKS")?all_parens:(env_bool"ALLPARENS")letinit?noop:_=initk(fun()->())