aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-17 22:18:21 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-17 22:18:21 -0400
commitca62aa365faee27895f8cb1eccddd7af8a7d15c9 (patch)
tree22d191de7f16c889c407ef92f27ef9efb3303998 /types.c
parent80ca0f0b1ba04c1aa3d7bb1a62928dbcecbb3bd8 (diff)
Switch types to use wordier syntax `[T]` -> `List(T)` etc
Diffstat (limited to 'types.c')
-rw-r--r--types.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/types.c b/types.c
index fde76440..f09d3170 100644
--- a/types.c
+++ b/types.c
@@ -36,19 +36,19 @@ CORD type_to_cord(type_t *t) {
case NumType: return Match(t, NumType)->bits == TYPE_NBITS32 ? "Num32" : "Num";
case ArrayType: {
auto array = Match(t, ArrayType);
- return CORD_asprintf("[%r]", type_to_cord(array->item_type));
+ return CORD_asprintf("List(%r)", type_to_cord(array->item_type));
}
case TableType: {
auto table = Match(t, TableType);
if (table->default_value)
- return CORD_asprintf("{%r=%.*s}", type_to_cord(table->key_type),
+ return CORD_asprintf("Table(%r=%.*s)", type_to_cord(table->key_type),
table->default_value->end - table->default_value->start, table->default_value->start);
else
- return CORD_asprintf("{%r:%r}", type_to_cord(table->key_type), type_to_cord(table->value_type));
+ return CORD_asprintf("Table(%r, %r)", type_to_cord(table->key_type), type_to_cord(table->value_type));
}
case SetType: {
auto set = Match(t, SetType);
- return CORD_asprintf("{%r}", type_to_cord(set->item_type));
+ return CORD_asprintf("Set(%r)", type_to_cord(set->item_type));
}
case ClosureType: {
return type_to_cord(Match(t, ClosureType)->fn);