123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114(** Semantic operations for {!type:Syntax.endo}. *)moduleEndo=struct(** Parameters of smart constructors. *)moduletypeParam=sig(** The displacement algebra. *)moduleShift:Shift.S(** The type that embeds levels. *)typelevel(** The embedding of levels into [level]. *)vallevel:(Shift.t,level)Syntax.endo->level(** Extract the embedded level, if any. *)valunlevel:level->(Shift.t,level)Syntax.endooptionend(** The signature of smart constructors. *)moduletypeS=sig(** The displacement algebra. *)typeshift(** The type that embeds levels. *)typelevel(** Smarter version of {!val:Syntax.Endo.shifted} that collapses multiple displacements
@raise Invalid_argument When it attempts to shift the top level. *)valshifted:level->shift->level(** [top] is {!val:Syntax.Endo.top} *)valtop:levelendend(** Semantic operations for {!type:Syntax.free}. *)moduleFree=struct(** Parameters of smart constructors. *)moduletypeParam=sig(** The displacement algebra. *)moduleShift:Shift.S(** The type of level variables. *)typevar(** [equal_var x y] checks whether two level variables [x] and [y] are the same. *)valequal_var:var->var->boolend(** The signature of smart constructors. *)moduletypeS=sig(** The displacement algebra. *)typeshift(** The type of level variables. *)typevar(** The type of freely generated levels. *)typelevel=(shift,var)Syntax.free(** [var] is {!val:Syntax.Free.var} *)valvar:var->levelincludeEndo.Swithtypeshift:=shiftandtypelevel:=level(** [equal l1 l2] checks whether [l1] and [l2] are the same universe level.
@raise Invalid_argument When [l1] or [l2] is shifted top. *)valequal:level->level->bool(** [lt l1 l2] checks whether [l1] is strictly less than [l2]. Note that trichotomy fails for general universe levels.
@raise Invalid_argument When [l1] or [l2] is shifted top. *)vallt:level->level->bool(** [leq l1 l2] checks whether [l1] is less than or equal to [l2]. Note that trichotomy fails for general universe levels.
@raise Invalid_argument When [l1] or [l2] is shifted top. *)valleq:level->level->bool(** [gt l1 l2] is [lt l2 l1]. *)valgt:level->level->bool(** [geq l1 l2] is [leq l2 l1]. *)valgeq:level->level->bool(** Infix notation. *)moduleInfix:sig(** Alias of {!val:equal}. *)val(=):level->level->bool(** Alias of {!val:lt}. *)val(<):level->level->bool(** Alias of {!val:leq}. *)val(<=):level->level->bool(** Alias of {!val:gt}. *)val(>):level->level->bool(** Alias of {!val:geq}. *)val(>=):level->level->boolendendend