You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cc @hypercubestart after I land #6274 there is an issue where omitting a return type now causes inference to fail, when you work on mutual recursion can you look into this?
// (@jroesch): if we leave off the return type this doesn't work
/*
* Computes the sum of a list of integer scalars.
*/
// (@jroesch): if we leave off the return type this doesn't work
def @sum(%xs: List[Tensor[(), int32]]) -> int32 {
let %add_f = fn(%x: Tensor[(), int32], %y: Tensor[(), int32]) -> Tensor[(), int32] {
%x + %y
};
@foldl(%add_f, 0, %xs)
}
/*
* Computes the size of a tree.
*/
def @size[A](%t: Tree[A]) -> Tensor[(), int32] {
match(%t) {
Rose(_, %sub_trees) => {
1 + @sum(@map(@size, %sub_trees))
},
}
}
The text was updated successfully, but these errors were encountered:
cc @hypercubestart after I land #6274 there is an issue where omitting a return type now causes inference to fail, when you work on mutual recursion can you look into this?
The text was updated successfully, but these errors were encountered: