123456789101112131415161718192021222324252627282930313233343536373839404142434445(******************************************************************************)(* *)(* 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. *)(* *)(******************************************************************************)module[@inline]Make(X:sigvaldebug:boolend)=structletindentation=ref0let[@inline]sectionk=ifX.debugthenbeginindentation:=!indentation+2;matchk()with|y->indentation:=!indentation-2;y|exceptione->indentation:=!indentation-2;raiseeendelsek()let[@inline]logformat=ifX.debugthenbeginfor_=1to!indentationdoPrintf.fprintfstderr" "done;Printf.fprintfstderrformatendelsePrintf.ifprintfstderrformatend