Skip to content

Commit

Permalink
Try to fix regressions with fpa
Browse files Browse the repository at this point in the history
  • Loading branch information
Halbaroth committed Apr 30, 2024
1 parent 823e0db commit 4105dbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/frontend/typechecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ module Env = struct
TTapp (Symbols.Op Float, [prec; exp; mode; x])
in
let nte = Fpa_rounding.string_of_rounding_mode NearestTiesToEven in
let tname = Fpa_rounding.fpa_rounding_mode_type_name in
let tname = Fpa_rounding.fpa_rounding_mode_ae_type_name in
let float32 = float (int "24") (int "149") in
let float32d = float32 (mode (Uid.of_string nte)) in
let float64 = float (int "53") (int "1074") in
Expand Down
6 changes: 2 additions & 4 deletions src/lib/structures/uid.ml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@ let equal u1 u2 =
match u1, u2 with
| Fake hs1, Fake hs2 -> Hstring.equal hs1 hs2
| Unique { index = i1; _ }, Unique { index = i2; _ }-> i1 = i2
| _ ->
Fmt.failwith "%a and %a" pp u1 pp u2
| _ -> false

let compare u1 u2 =
match u1, u2 with
| Fake hs1, Fake hs2 -> Hstring.compare hs1 hs2
| Unique { index = i1; _ }, Unique { index = i2; _ } -> i1 - i2
| _ ->
Fmt.failwith "%a and %a" pp u1 pp u2
| _ -> -1

let rec list_assoc x = function
| [] -> raise Not_found
Expand Down

0 comments on commit 4105dbf

Please sign in to comment.