about summary refs log tree commit diff
path: root/src/root.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/root.zig')
-rw-r--r--src/root.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/root.zig b/src/root.zig
index 1ce21b3..796bb04 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -113,10 +113,8 @@ pub fn wrap(x: anytype) !Value {
         .@"enum" => switch (x) {
             inline else => |tag| keyword(@tagName(tag)),
         },
-        .error_set => switch (x) {
-            inline else => |err| keyword("error/" ++ @errorName(err)),
-        },
-        .error_union => try wrap(x catch |err| err),
+        .error_set => keyword("zsanett/error"),  // FIXME: use janet error
+        .error_union => if (x) |p| try wrap(p) else |err| try wrap(err),
         .@"fn" => |info| y: {
             assert(!info.is_generic);
             const entry = try fn_map.getOrPut(c_allocator, &x);