1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465(**************************************************************************)(* *)(* Copyright 2019 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. *)(* *)(**************************************************************************)(* basic ops *)typet=stringletof_strings=sletto_strings=sletcompare=OpamStd.String.compare_caseletto_jsons=`O[("sys_package",`Strings)]letof_json=function|`Odict->(matchList.assoc"sys_package"dictwith|`Strings->Some(of_strings)|_->None|exceptionNot_found->None)|_->NonemoduleO=structtypetmp=ttypet=tmpletcompare=compareletto_string=to_stringletto_json=to_jsonletof_json=of_jsonendmoduleSet=OpamStd.Set.Make(O)moduleMap=OpamStd.Map.Make(O)letraw_setset=OpamStd.String.Set.fold(funspkgset->Set.add(of_stringspkg)set)setSet.emptytypestatus={s_available:Set.t;(** Package available but not installed *)s_not_found:Set.t;(** Package unavailable on this system *)}letstatus_empty={s_available=Set.empty;s_not_found=Set.empty;}letstring_of_statussp=Printf.sprintf"available: %s; not_found: %s"(Set.to_stringsp.s_available)(Set.to_stringsp.s_not_found)