Update: The following two programs work. One on list identity function and another one on creating a singleton list inside the function and accessing the list head. So nth function by itself doesn’t seem to be an issue. The error happens when calling nth on a input list.
fn (%states: List[Tensor[(2, 4), float32]]) -> List[Tensor[(2, 4), float32]] {
%states
}
fn (%input: Tensor[(10, 10), float32]) -> Tensor[(10, 10), float32] {
%0 = Nil /* ty=List[Tensor[(10, 10), float32]] */;
%1 = Cons(%input, %0) /* ty=List[Tensor[(10, 10), float32]] */;
@nth(%1, 0 /* ty=int32 */) /* ty=Tensor[(10, 10), float32] */
}