mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00

Figuring out what this module was doing, and why, took me a bit less than half an hour. We should document what's happening for others in the future so they don't need to follow up on Zulip necessarily.
23 lines
1,020 B
Text
23 lines
1,020 B
Text
procedure List.3 (#Attr.2, #Attr.3):
|
|
let Test.13 : Builtin(Int(U64)) = lowlevel ListLen #Attr.2;
|
|
let Test.10 : Builtin(Bool) = lowlevel NumLt #Attr.3 Test.13;
|
|
if Test.10 then
|
|
let Test.12 : Builtin(Int(I64)) = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
|
let Test.11 : Union(NonRecursive([[Struct([])], [Builtin(Int(I64))]])) = Ok Test.12;
|
|
ret Test.11;
|
|
else
|
|
let Test.9 : Struct([]) = Struct {};
|
|
let Test.8 : Union(NonRecursive([[Struct([])], [Builtin(Int(I64))]])) = Err Test.9;
|
|
ret Test.8;
|
|
|
|
procedure Test.1 (Test.2):
|
|
let Test.6 : Builtin(List(Builtin(Int(I64)))) = Array [1i64, 2i64, 3i64];
|
|
let Test.7 : Builtin(Int(U64)) = 0i64;
|
|
let Test.5 : Union(NonRecursive([[Struct([])], [Builtin(Int(I64))]])) = CallByName List.3 Test.6 Test.7;
|
|
dec Test.6;
|
|
ret Test.5;
|
|
|
|
procedure Test.0 ():
|
|
let Test.4 : Struct([]) = Struct {};
|
|
let Test.3 : Union(NonRecursive([[Struct([])], [Builtin(Int(I64))]])) = CallByName Test.1 Test.4;
|
|
ret Test.3;
|