Skip to content

Commit

Permalink
fix ocaml build by moving to Zarith methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronsa authored and NikolajBjorner committed Oct 14, 2019
1 parent 09523a4 commit 77c3f1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/ml/z3.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ struct
let get_big_int (x:expr) =
if is_int_numeral x then
let s = (Z3native.get_numeral_string (Expr.gc x) x) in
Big_int.big_int_of_string s
Z.of_string s
else
raise (Error "Conversion failed.")

Expand All @@ -1063,7 +1063,7 @@ struct
let get_ratio x =
if is_rat_numeral x then
let s = Z3native.get_numeral_string (Expr.gc x) x in
Ratio.ratio_of_string s
Q.of_string s
else
raise (Error "Conversion failed.")

Expand Down
4 changes: 2 additions & 2 deletions src/api/ml/z3.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ sig
val mk_sort : context -> Sort.sort

(** Get a big_int from an integer numeral *)
val get_big_int : Expr.expr -> Big_int.big_int
val get_big_int : Expr.expr -> Z.t

(** Returns a string representation of a numeral. *)
val numeral_to_string : Expr.expr -> string
Expand Down Expand Up @@ -1217,7 +1217,7 @@ sig
val get_denominator : Expr.expr -> Expr.expr

(** Get a ratio from a real numeral *)
val get_ratio : Expr.expr -> Ratio.ratio
val get_ratio : Expr.expr -> Q.t

(** Returns a string representation in decimal notation.
The result has at most as many decimal places as indicated by the int argument.*)
Expand Down

1 comment on commit 77c3f1f

@arbipher
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This two change makes the document building fail when
doc> python mk_api_doc.py
The error happens exactly at these two lines (1162, 1220).

I can build the document when commenting these two lines temporarily.

Please sign in to comment.