123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778(* SPDX-License-Identifier: LGPL-2.1-or-later *)(*
* OCanren.
* Copyright (C) 2015-2022
* Dmitri Boulytchev, Dmitry Kosarev, Alexey Syomin, Evgeny Moiseenko
* St.Petersburg State University, JetBrains Research
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2, as published by the Free Software Foundation.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Library General Public License version 2 for more details
* (enclosed in the file COPYING).
*)includeLogicincludeCoremoduleStream=StreammoduleRunconf=RunconfmoduleTimer=TimermoduleEnv=EnvmoduleStd=structmodulePair=PairmoduleOption=OptionmoduleBool=BoolmoduleNat=NatmoduleList=Listleteqoxyt=conde[(x===y)&&&(t===Bool.truo);(x=/=y)&&&(t===Bool.falso);]letneqoxyt=conde[(x=/=y)&&&(t===Bool.truo);(x===y)&&&(t===Bool.falso);]letnatn=Nat.nat(Nat.of_intn)let(%)=List.conslet(%<)=List.(%<)let(!<)=List.(!<)letnil=List.nilletreclistf=function|[]->nil()|x::xs->List.cons(fx)(listfxs)letrecnat_list=function|[]->nil()|x::xs->natx%nat_listxsletsome=Option.someletnone=Option.noneletpair=Pair.pairletstructural=Core.structuralletdebug_var=Core.debug_varletonly_head=Core.only_headendIFDEFSTATSTHENmodulePeep=Peeplet_=Peep.unification_counterEND