You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 70073c6
Browse filesBrowse the repository at this point in the historyBrowse files
Drop the name list from the untagged variants spec
Why:
Payloads are now recognized only by annotations and builtin types, so
the spec's list of stdlib type names and the fallback to it are gone.
Rule 4 lists `promise<_>` as the one builtin class and says that a type is
never recognized by its name; rule 5 keeps the stdlib's annotations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fc7LEuyEfynjaKCVEBPmTF
Signed-off-by: Christoph Knittel <ck@cca.io>
`@instanceOf("C")` on a type declares that its values are instances of the
118
120
global class at the path `C`, such as `"Date"` or `"Intl.Locale"`.
@@ -181,37 +183,22 @@ The stdlib annotates the types of the classes it binds:
181
183
|`Int8Array.t` and the other typed arrays, public abbreviations of `TypedArray.t<_>`|`@instanceOf` the class of the same name |
182
184
|`Symbol.t`|`@typeOf("symbol")`|
183
185
184
-
Types without annotations are recognized from a fixed list of type names in
185
-
`ast_untagged_variants.ml:type_to_instanceof_backed_obj`. Every listed stdlib
186
-
type is annotated, so the list only covers other types printed with one of
187
-
these paths. The predefined
188
-
`promise<_>` and `array<_>` are matched by path; the others by the printed
189
-
path of the type:
190
-
191
-
| Type | Class |
192
-
| --- | --- |
193
-
|`promise<_>`|`Promise`|
194
-
|`array<_>`|`Array` (checked with `Array.isArray`) |
195
-
|`Date.t`, `RegExp.t`, `File.t`, `Blob.t`, `ArrayBuffer.t`, `DataView.t`| the class of the same name |
196
-
|`Set.t`, `Map.t`, `WeakSet.t`, `WeakMap.t`| the class of the same name |
197
-
|`Int8Array.t`, `Uint8Array.t`, `Uint8ClampedArray.t`, `Int16Array.t`, `Uint16Array.t`, `Int32Array.t`, `Uint32Array.t`, `Float32Array.t`, `Float64Array.t`, `BigInt64Array.t`, `BigUint64Array.t`| the class of the same name |
198
-
199
-
The listed classes have no superclasses. The typed-array types are
200
-
abbreviations of one type, `TypedArray.t<_>`, and are told apart only by
201
-
their annotations, which are read on the name as written (Known bugs).
186
+
The typed-array types are abbreviations of one type, `TypedArray.t<_>`, and
187
+
are told apart only by their annotations, which are read on the name as
0 commit comments