Skip to content

Commit c3cab80

Browse files
Revert "Make various primitives non_null_value (#2604)"
This reverts commit fd39aec.
1 parent 7036eda commit c3cab80

File tree

23 files changed

+115
-1197
lines changed

23 files changed

+115
-1197
lines changed

ocaml/otherlibs/alpha/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
(rule
4040
(deps
4141
(glob_files ../stdlib_alpha/*.{ml,mli}))
42-
(targets alpha.ml alpha.mli or_null.ml or_null.mli)
42+
(targets alpha.ml alpha.mli)
4343
(action
4444
(bash
4545
"cp ../stdlib_alpha/*.{ml,mli} .; mv stdlib_alpha.ml alpha.ml; mv stdlib_alpha.mli alpha.mli")))

ocaml/otherlibs/stdlib_alpha/or_null.ml

Lines changed: 0 additions & 15 deletions
This file was deleted.

ocaml/otherlibs/stdlib_alpha/or_null.mli

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
module Or_null = Or_null
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
module Or_null = Or_null

ocaml/testsuite/tests/typing-layouts-err-msg/annots.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Line 1, characters 9-33:
9090
^^^^^^^^^^^^^^^^^^^^^^^^
9191
Error: This alias is bound to type 'a -> int
9292
but is used as an instance of type ('b : void)
93-
The layout of 'a -> int is non_null_value, because
93+
The layout of 'a -> int is value, because
9494
it's a function type.
9595
But the layout of 'a -> int must be a sublayout of void, because
9696
of the annotation on the type variable 'b.
@@ -104,7 +104,7 @@ Line 1, characters 27-31:
104104
1 | type t = 'a -> int as (_ : void)
105105
^^^^
106106
Error: Bad layout annotation:
107-
The layout of 'a -> int is non_null_value, because
107+
The layout of 'a -> int is value, because
108108
it's a function type.
109109
But the layout of 'a -> int must be a sublayout of void, because
110110
of the annotation on the wildcard _ at line 1, characters 27-31.

ocaml/testsuite/tests/typing-layouts-err-msg/value.ml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ type r : void = {a:string}
121121
Line 1, characters 0-26:
122122
1 | type r : void = {a:string}
123123
^^^^^^^^^^^^^^^^^^^^^^^^^^
124-
Error: The layout of type r is non_null_value, because
124+
Error: The layout of type r is value, because
125125
it's a boxed record type.
126126
But the layout of type r must be a sublayout of void, because
127127
of the annotation on the declaration of the type r.
@@ -133,7 +133,7 @@ type v : void = A of t_value
133133
Line 1, characters 0-28:
134134
1 | type v : void = A of t_value
135135
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136-
Error: The layout of type v is non_null_value, because
136+
Error: The layout of type v is value, because
137137
it's a boxed variant type.
138138
But the layout of type v must be a sublayout of void, because
139139
of the annotation on the declaration of the type v.
@@ -145,7 +145,7 @@ type attr : void = ..
145145
Line 1, characters 0-21:
146146
1 | type attr : void = ..
147147
^^^^^^^^^^^^^^^^^^^^^
148-
Error: The layout of type attr is non_null_value, because
148+
Error: The layout of type attr is value, because
149149
it's an extensible variant type.
150150
But the layout of type attr must be a sublayout of void, because
151151
of the annotation on the declaration of the type attr.
@@ -159,8 +159,8 @@ Line 1, characters 40-45:
159159
^^^^^
160160
Error: This expression has type string but an expression was expected of type
161161
('a : void)
162-
The layout of string is non_null_value, because
163-
it is the primitive non-null value type string.
162+
The layout of string is value, because
163+
it is the primitive value type string.
164164
But the layout of string must be a sublayout of void, because
165165
of the annotation on the type variable 'a.
166166
|}];;
@@ -187,7 +187,7 @@ Line 1, characters 40-45:
187187
^^^^^
188188
Error: This expression has type 'b * 'c
189189
but an expression was expected of type ('a : void)
190-
The layout of 'a * 'b is non_null_value, because
190+
The layout of 'a * 'b is value, because
191191
it's a tuple type.
192192
But the layout of 'a * 'b must be a sublayout of void, because
193193
of the annotation on the type variable 'a.
@@ -206,7 +206,7 @@ Line 2, characters 36-37:
206206
^
207207
Error: This expression has type [ `A of int | `B ]
208208
but an expression was expected of type 'a t = ('a : void)
209-
The layout of [ `A of int | `B ] is non_null_value, because
209+
The layout of [ `A of int | `B ] is value, because
210210
it's a polymorphic variant type.
211211
But the layout of [ `A of int | `B ] must be a sublayout of void, because
212212
of the definition of t at line 1, characters 0-22.
@@ -222,7 +222,7 @@ Line 2, characters 31-32:
222222
^
223223
Error: This expression has type int -> int
224224
but an expression was expected of type 'a t = ('a : void)
225-
The layout of int -> int is non_null_value, because
225+
The layout of int -> int is value, because
226226
it's a function type.
227227
But the layout of int -> int must be a sublayout of void, because
228228
of the definition of t at line 1, characters 0-22.
@@ -248,7 +248,7 @@ Line 4, characters 17-39:
248248
^^^^^^^^^^^^^^^^^^^^^^
249249
Error: This expression has type (module X_int)
250250
but an expression was expected of type 'a t = ('a : void)
251-
The layout of (module X_int) is non_null_value, because
251+
The layout of (module X_int) is value, because
252252
it's a first-class module type.
253253
But the layout of (module X_int) must be a sublayout of void, because
254254
of the definition of t at line 1, characters 0-22.

ocaml/testsuite/tests/typing-layouts-non-null-value/arguments.ml

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)