File tree Expand file tree Collapse file tree 6 files changed +9
-11
lines changed
Expand file tree Collapse file tree 6 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,6 @@ module Prunes : sig
154154 type t
155155
156156 val empty : t
157- (* Returns false when constraints are violated *)
158157 val recheck : t -> Env .t -> Subst .t -> rez
159158 val check_last : t -> Env .t -> Subst .t -> rez
160159 val extend : t -> Term.VarTbl .key -> ('a , 'b ) reifier -> 'b cond -> t
Original file line number Diff line number Diff line change @@ -178,8 +178,8 @@ module Disjunct :
178178 raise Disequality_fulfilled
179179 | Refined delta -> (
180180 (* When leading terms are reified into something new, we still need to
181- do whole unification, beacuse other pairs may need walking ---
182- (we postponed walking, so som einformation may be lost.)
181+ do whole unification, because other pairs may need walking ---
182+ (we postponed walking, so some information may be lost.)
183183 See issue #173
184184 *)
185185 (* log "Refined into: %a" (Format.pp_print_list Subst.Binding.pp) delta; *)
Original file line number Diff line number Diff line change @@ -87,10 +87,6 @@ module Reifier = struct
8787 let i, cs = Term.Var. reify (reify env) v in
8888 Var (i, cs)
8989
90- (* can be implemented more efficiently,
91- * without allocation of `'a logic`,
92- * but for demonstration purposes this implementation is okay
93- *)
9490 let prj_exn : ('a ilogic, 'a) t =
9591 fun env t ->
9692 match Term. var t with
Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ module Reifier : sig
6262 *)
6363 val prj_exn : ('a ilogic , 'a ) t
6464
65- (* TODO(Kakadu): document this *)
65+ (* * [prj onvar] Projects implicit logic into the underlying type,
66+ * handling logic variables with [onvar]
67+ *)
6668 val prj : (int -> 'a ) -> ('a ilogic , 'a ) t
6769
6870 (* Interesting part --- we can apply a reifier to a value dipped into `State.t` comonad *)
@@ -82,7 +84,7 @@ module Reifier : sig
8284 (* * Fixpoint for reifier. *)
8385 val fix : ( ('a , 'b ) t as 'c -> 'c ) -> 'c
8486
85- (* * And uxiliary function to make reifiers generated by generic programming point-free. *)
87+ (* * An auxiliary function to make reifiers generated by generic programming point-free. *)
8688 val rework : fv :('a Env .m -> 'b Env .m )
8789 -> ('a logic Env .m -> 'b logic Env .m )
8890 -> 'a logic Env .m
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ module Answer :
8989 val subsumed : Env .t -> t -> t -> bool
9090 end
9191
92+ (* see [apply] *)
9293val reify : Env .t -> t -> 'a -> Answer .t
9394
9495IFDEF STATS THEN
Original file line number Diff line number Diff line change 11(* * {1 Main} *)
22
3- (* * In this module you can find convenience functions to speedup your introduction to OCanre .
4- In realy projects, more likely you will need more low-level interface like {!OCanren.run}. *)
3+ (* * In this module you can find convenience functions to speedup your introduction to OCanren .
4+ In real projects, more likely you will need more low-level interface like {!OCanren.run}. *)
55
66(* *
77 The call [run_r reifier to_string count num num_handler ("description", goal)] should be used
You can’t perform that action at this time.
0 commit comments