123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566(**************************************************************************)(* *)(* 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_caseletequalsr=comparesr=0letto_jsons=`O[("sys_package",`Strings)]letof_json=function|`Odict->(matchOpamStd.List.assocString.equal"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)