Skip to content

type-tag → type-value#376

Merged
vekatze merged 16 commits intomainfrom
type-value
Jan 25, 2026
Merged

type-tag → type-value#376
vekatze merged 16 commits intomainfrom
type-value

Conversation

@vekatze
Copy link
Owner

@vekatze vekatze commented Jan 25, 2026

before:

let tag = magic get-type-tag(a);
match tag {
| Vector =>
  let t = magic get-vector-content-type(a);
  ...
| Algebraic =>
  let data-args = magic get-data-args(a);
  let num = magic get-cons-size(a);
  let ts = magic get-constructor-arg-types(a, i); // 0 <= i < num
  ...
| _ =>
  ...
}

after:

let type-value = magic inspect-type(a);
match type-value {
| Vector(t) =>
  ...
| Algebraic(data-name, data-args, construtors) => // constructors: list(constructor-info)
  ...
| _ =>
  ...
}

@vekatze vekatze merged commit 4eeb6ac into main Jan 25, 2026
4 checks passed
@vekatze vekatze deleted the type-value branch January 25, 2026 10:04
@vekatze vekatze self-assigned this Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant