mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
The host was passing a bare unit value, but Roc functions always expect arguments wrapped in a tuple, even for single parameters. Updated fx platform host to pass arguments as a struct matching tuple layout. Still debugging TypeMismatch in interpreter evaluation.
21 lines
664 B
Zig
21 lines
664 B
Zig
const std = @import("std");
|
|
const Repl = @import("src/repl/eval.zig").Repl;
|
|
|
|
pub fn main() !void {
|
|
const gpa = std.heap.page_allocator;
|
|
|
|
var repl = try Repl.init(gpa);
|
|
defer repl.deinit();
|
|
|
|
// Line 1: Str.is_empty("")
|
|
std.debug.print("Line 1: Str.is_empty(\"\")\n", .{});
|
|
const out1 = try repl.processInput("Str.is_empty(\"\")");
|
|
defer gpa.free(out1);
|
|
std.debug.print("Output 1: {s}\n\n", .{out1});
|
|
|
|
// Line 2: Str.is_empty("a")
|
|
std.debug.print("Line 2: Str.is_empty(\"a\")\n", .{});
|
|
const out2 = try repl.processInput("Str.is_empty(\"a\")");
|
|
defer gpa.free(out2);
|
|
std.debug.print("Output 2: {s}\n", .{out2});
|
|
}
|