1234567891011121314151617181920212223242526272829303132333435(*****************************************************************************)(* *)(* Copyright (C) 2026 Yves Ndiaye *)(* *)(* This Source Code Form is subject to the terms of the Mozilla Public *)(* License, v. 2.0. If a copy of the MPL was not distributed with this *)(* file, You can obtain one at https://mozilla.org/MPL/2.0/. *)(* *)(*****************************************************************************)letred=31letblue=34letpurple=35letlogoutchanfmt=Printf.fprintfoutchan("\u{001B}[%um%s\u{001B}[0m"^^fmt)blue"info = "letifcolorprintcolorprefixverboseoutchanfmt=letf=ifverbosethenPrintf.fprintfelsePrintf.ifprintfinfoutchan("\u{001B}[%um%s\u{001B}[0m"^^fmt^^"\n%!")colorprefixletiflogverbose=ifcolorprintblue"info: "verboseletifwarnverbose=ifcolorprintpurple"warn: "verboseletiferrverbose=ifcolorprintred"error: "verbose(** [warn fmt] is [ifwarn true stderr fmt]. *)letwarnfmt=ifwarntruestderrfmt(** [err fmt] is [iferr true stderr fmt]. *)leterrfmt=iferrtruestderrfmt