Define naturality of tuple indices

This commit is contained in:
Ayaz Hafiz 2023-03-22 16:55:23 -05:00
parent cb5a21cb20
commit 4d3bda51e1
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -1,7 +1,7 @@
use roc_can::expr::{
AnnotatedMark, ClosureData, Expr, Field, IntValue, Recursive, WhenBranch, WhenBranchPattern,
};
use roc_can::num::IntBound;
use roc_can::num::{IntBound, IntLitWidth};
use roc_can::pattern::Pattern;
use roc_collections::SendMap;
use roc_module::called_via::CalledVia;
@ -635,11 +635,11 @@ fn step_elem(
WhenBranch {
patterns: vec![WhenBranchPattern {
pattern: Loc::at_zero(Pattern::IntLiteral(
env.subs.fresh_unnamed_flex_var(),
env.subs.fresh_unnamed_flex_var(),
Variable::NAT,
Variable::NATURAL,
index.to_string().into_boxed_str(),
IntValue::I128((index as i128).to_ne_bytes()),
IntBound::None,
IntBound::Exact(IntLitWidth::Nat),
)),
degenerate: false,
}],