Skip to content

Commit

Permalink
Replace emit-related failwiths with unit in mCP and constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh committed Sep 12, 2023
1 parent 35388b8 commit 49f771e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/analyses/mCP.ml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ struct
in
let emit = match emits with
| Some emits -> (fun e -> emits := e :: !emits) (* [emits] is in reverse order. *)
| None -> (fun _ -> failwith ("Cannot \"emit\" in " ^ tfname ^ " context."))
| None -> (fun _ -> ())
in
let querycache = Queries.Hashtbl.create 13 in
let rec ctx' =
Expand Down
2 changes: 1 addition & 1 deletion src/framework/constraints.ml
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ struct
(* now watch this ... *)
let rec ctx =
{ ask = (fun (type a) (q: a Queries.t) -> S.query ctx q)
; emit = (fun _ -> failwith "emit outside MCP")
; emit = (fun _ -> ())
; node = fst var
; prev_node = prev_node
; control_context = snd var |> Obj.obj
Expand Down

0 comments on commit 49f771e

Please sign in to comment.