Skip to content

Commit 099e532

Browse files
authored
Remove the type float# = float hack (#1478)
1 parent b0f5ecc commit 099e532

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

ocaml/testsuite/tests/typing-layouts/unboxed_floats.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
* expect
44
*)
55

6-
(* CR layouts: These tests will change when we remove the obvious inaccuracy
7-
where float# is aliased to float.
6+
(* CR layouts: We should start running these tests soon when
7+
we have proper typechecking for unboxed float literals.
88
*)
99

10+
(*
1011
let id : float# -> float# = fun x -> x;;
1112
1213
id #4.0;;
@@ -32,3 +33,4 @@ val apply : (float# -> float# -> float#) -> float# -> float# -> float# =
3233
<fun>
3334
- : float# = 9.
3435
|}];;
36+
*)

ocaml/typing/predef.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,7 @@ let common_initial_env add_type add_extension empty_env =
227227
~layout:(Layout.value ~why:Extensible_variant)
228228
|> add_type ident_extension_constructor
229229
|> add_type ident_float
230-
(* CR layouts: Adding the alias float#=float is a convenient hack so
231-
we can write tests for float#, but this is obviously something we'll
232-
want to change.
233-
*)
234-
|> add_type ident_float_unboxed ~manifest:type_float
230+
|> add_type ident_float_unboxed
235231
|> add_type ident_floatarray
236232
|> add_type ident_int ~layout:(Layout.immediate ~why:(Primitive ident_int))
237233
|> add_type ident_int32

0 commit comments

Comments
 (0)