Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file warnings.ml
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273(** This module implements a warning management module *)typewarning=|Configofconfig_warning|Term_parsingofterm_parsing_warningandterm_parsing_warning=|Var_and_constof(string*string*(Lexing.position*Lexing.position))andconfig_warning=|Missing_keyof(string*stringlist*string)(* Aimed at providing info
about incorrect json
config file. The string
list is a path to the
group of the expected key
*)|Missing_nameof(string*stringlist*string*string)|Missing_engineof(string*stringlist*string*string)|Default_engines|Default_colors|Bad_groupof(string*stringlist*string*Yojson.Basic.t*string*string)|Json_errorofstringletgrp_preamblefilepath=matchpathwith|[]->Printf.sprintf"In file \"%s\""file|path->Printf.sprintf"In file \"%s\", under the path \"%s\""file(Utils.string_of_list" -> "(funx->x)path)letissue_warning=function|Config(Missing_key(file,path,key))->Logs.warn(funm->m"%s, key \"%s\" is missing"(grp_preamblefilepath)key)|Config(Missing_name(file,path,key,msg))->Logs.warn(funm->m"%s, key \"%s\" is missing in association with signature engine \
\"%s\""(grp_preamblefilepath)keymsg)|Config(Missing_engine(file,path,key,msg))->Logs.warn(funm->m"%s, key \"%s\" is missing in association with signature name \
\"%s\""(grp_preamblefilepath)keymsg)|ConfigDefault_engines->Logs.warn(funm->m"Using default signature to engine mapping")|ConfigDefault_colors->Logs.warn(funm->m"Using default bacground and node colors")|Config(Bad_group(file,path,yojson_msg,json,msg,msg'))->let()=Logs.warn(funm->m"%s, %s"(grp_preamblefilepath)yojson_msg)inlet()=Logs.warn(funm->m"%s, but got: \"%s\""msg(Yojson.Basic.pretty_to_string~std:truejson))inLogs.warn(funm->m"%s"msg')|Config(Json_errormsg)->let()=Logs.warn(funm->m"Json error: %s"msg)inLogs.warn(funm->m"Using default configuration")|Term_parsing(Var_and_const(id,sg_name,(pos1,pos2)))->ifpos1=Lexing.dummy_pos||pos2=Lexing.dummy_posthenLogs.warn(funm->m"@[\"%a\"@ is@ both@ a@ variable@ and@ a@ constant@ of@ the@ signature@ \"%a\".@ Used@ here@ as@ a@ variable.@]"Utils.terms_ppidUtils.sig_ppsg_name)elselet()=ifpos1.Lexing.pos_fname=""&&pos2.Lexing.pos_fname=""thenError.underline_errorid(pos1,pos2)else()inletloc_string=Error.compute_comment_for_location(pos1,pos2)inLogs.warn(funm->m"@[@[%a:@]@;@[\"%a\"@ is@ both@ a@ variable@ and@ a@ constant@ of@ the@ signature@ \"%a\".@ Used@ here@ as@ a@ variable.@]@]"Error.pp_textloc_stringUtils.terms_ppidUtils.sig_ppsg_name)