Skip to content

Commit

Permalink
Make Expr.Bool functions backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Jun 24, 2024
1 parent b4ac590 commit d6d1ca5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/expr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ module Bool = struct

let to_val b = if b then true_ else false_

let not_ (b : t) =
let v b = to_val b [@@inline]

let not (b : t) =
let bexpr = view b in
match of_val bexpr with
| Some b -> to_val (not b)
Expand Down
4 changes: 3 additions & 1 deletion lib/expr.mli
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ module Bool : sig

val false_ : t

val not_ : t -> t
val v : bool -> t

val not : t -> t

val equal : t -> t -> t

Expand Down

0 comments on commit d6d1ca5

Please sign in to comment.