Skip to content

Commit

Permalink
Adjusting micro's Meta to match current builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Jan 22, 2025
1 parent 2f8d126 commit e776053
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/micro-distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ type Primitive

type_of value = @Builtin_Method "Meta.type_of"

is_polyglot value = @Builtin_Method "Meta.is_polyglot"
is_polyglot value = 3 == get_kind_builtin value
get_kind_builtin value = @Builtin_Method "Meta.get_kind_builtin"

# A **very** minimal version of meta for the purpose of tests
meta value =
if is_unresolved_symbol value then Unresolved_Symbol.Value value else
Primitive.Value value
kind = get_kind_builtin value
case kind of
#1 -> Constructor.Value ac
#2 -> Atom.Value value
#3 -> Polyglot.Value value
4 -> Unresolved_Symbol.Value value
#5 -> Error.Value value.catch
#6 -> Type.Value value
_ -> Primitive.Value value

is_unresolved_symbol value = @Builtin_Method "Meta.is_unresolved_symbol"
get_unresolved_symbol_name symbol = @Builtin_Method "Meta.get_unresolved_symbol_name"
get_unresolved_symbol_scope symbol = @Builtin_Method "Meta.get_unresolved_symbol_scope"
get_atom_constructor atom = @Builtin_Method "Meta.get_atom_constructor"
Expand Down

0 comments on commit e776053

Please sign in to comment.