Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file Semantics.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687moduleEndo=structincludeSemanticsSigs.EndomoduleMake(P:Param):Swithtypeshift:=P.Shift.tandtypelevel:=P.level=structincludePopenSyntax.Endolettop=levelTopletshiftedls=matchunlevellwith|SomeTop->invalid_arg"cannot shift the top level"|Some(Shifted(l,s'))->lets=Shift.composes'sinlevel@@Shifted(l,s)|None->level@@Shifted(l,s)endendmoduleFree=structincludeSemanticsSigs.FreemoduleMake(P:Param):Swithtypeshift:=P.Shift.tandtypevar:=P.var=structopenSyntax.Freeletvar=varmoduleP=structincludePtypelevel=(Shift.t,var)Syntax.freeletlevelt=Leveltletunlevelt=matchtwithLevell->Somel|_->NoneendincludePincludeEndo.Make(P)letnormalizel=letrecgolacc=matchlwith|LevelTop->ifacc=[]thenlevelTopelseinvalid_arg"cannot shift the top level"|Level(Shifted(l,s))->gol(s::acc)|Varv->Level(Shifted(Varv,List.fold_leftShift.composeShift.idacc))ingol[]letequalxy=matchnormalizex,normalizeywith|LevelTop,LevelTop->true|Level(Shifted(Varvx,sx)),Level(Shifted(Varvy,sy))->equal_varvxvy&&Shift.equalsxsy|_->falseletltxy=matchnormalizex,normalizeywith|Level(Shifted(Var_,_)),LevelTop->true|Level(Shifted(Varvx,sx)),Level(Shifted(Varvy,sy))->equal_varvxvy&&Shift.ltsxsy|_->falseletleqxy=matchnormalizex,normalizeywith|_,LevelTop->true|Level(Shifted(Varvx,sx)),Level(Shifted(Varvy,sy))->equal_varvxvy&&Shift.leqsxsy|_->falseletgtxy=ltyxletgeqxy=leqyxmoduleInfix=structlet(=)=equallet(<)=ltlet(<=)=leqlet(>)=gtlet(>=)=geqendendend