Skip to content

Commit 5ad14ed

Browse files
committed
wip
1 parent 0cdaae2 commit 5ad14ed

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/DebuggerSigs.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
type action =
2+
| Emit of Loctext.t
3+
| Trace of [`Open | `Close] * Loctext.t
4+
15
module type S =
26
sig
7+
val act : action -> unit
38
val emit : ?loc:Range.t -> string -> unit
49
val emitf : ?loc:Range.t -> ('a, Format.formatter, unit, unit) format4 -> 'a
510
val trace : ?loc:Range.t -> string -> (unit -> 'a) -> 'a

src/Reporter.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ struct
6161
exnc = (function Fatal d -> fatal d | exn -> raise exn);
6262
effc = fun (type a) (eff : a Effect.t) ->
6363
match eff with
64+
|
6465
| Emit d -> Option.some @@ fun (k : (a, _) Effect.Deep.continuation) ->
6566
Algaeff.Fun.Deep.finally k @@ fun () -> emit d
6667
| _ -> None }
6768

6869
(* Algebraic effects *)
6970

70-
let run ?init_loc ?(init_backtrace=Emp) ~emit ~fatal f =
71+
let run ?init_loc ?(init_backtrace=Emp) ?debug ~emit ~fatal f =
7172
Traces.run ~env:(init_loc, init_backtrace) @@ fun () ->
7273
Effect.Deep.match_with f () @@ handler ~emit ~fatal
7374

0 commit comments

Comments
 (0)