Skip to content

Commit

Permalink
Use checked_oint v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hirrolot committed Nov 27, 2024
1 parent 29365b8 commit 70aa893
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
dune
pprint
(checked_oint
(>= 0.3.0))
(>= 0.4.0))
ppx_deriving
ppx_string_interpolation
ppx_yojson_conv
Expand Down
6 changes: 3 additions & 3 deletions lib/mechanics/simplifier.ml
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ let handle_op1 ~(op : Symbol.t) : t -> t =

let handle_op2 ~(op : Symbol.t) : t * t -> t = function
| (Const (Const.Int m) as t1), (Const (Const.Int n) as t2) ->
(match Checked_oint.pair_exn (m, n) with
| (module Pair) -> do_int_op2 ~op (module Pair)
| exception Invalid_argument _ -> invalid_arg_list ~op [ t1; t2 ])
(match Checked_oint.pair (m, n) with
| Some (module Pair) -> do_int_op2 ~op (module Pair)
| None -> invalid_arg_list ~op [ t1; t2 ])
| Const (Const.String s1), Const (Const.String s2) -> do_string_op2 ~op (s1, s2)
| Const (Const.String s), Const (Const.Int (U64 idx)) when op = symbol "get" ->
let idx = to_int (U64 idx) in
Expand Down
2 changes: 1 addition & 1 deletion mazeppa.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ depends: [
"ocaml" {>= "4.14"}
"dune" {>= "3.14"}
"pprint"
"checked_oint" {>= "0.3.0"}
"checked_oint" {>= "0.4.0"}
"ppx_deriving"
"ppx_string_interpolation"
"ppx_yojson_conv"
Expand Down

0 comments on commit 70aa893

Please sign in to comment.