This commit is contained in:
Folkert 2022-03-02 14:46:30 +01:00
parent fd8dfd284d
commit ec099bbdec
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
12 changed files with 103 additions and 118 deletions

View file

@ -2,7 +2,7 @@ use crate::pretty_print::Parens;
use crate::subs::{
GetSubsSlice, RecordFields, Subs, UnionTags, VarStore, Variable, VariableSubsSlice,
};
use roc_collections::all::{ImMap, ImSet, Index, MutSet, SendMap};
use roc_collections::all::{HumanIndex, ImMap, ImSet, MutSet, SendMap};
use roc_error_macros::internal_error;
use roc_module::called_via::CalledVia;
use roc_module::ident::{ForeignSymbol, Ident, Lowercase, TagName};
@ -1203,14 +1203,14 @@ pub struct TagUnionStructure<'a> {
pub enum PReason {
TypedArg {
opt_name: Option<Symbol>,
index: Index,
index: HumanIndex,
},
WhenMatch {
index: Index,
index: HumanIndex,
},
TagArg {
tag_name: TagName,
index: Index,
index: HumanIndex,
},
PatternGuard,
OptionalField,
@ -1219,12 +1219,12 @@ pub enum PReason {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AnnotationSource {
TypedIfBranch {
index: Index,
index: HumanIndex,
num_branches: usize,
region: Region,
},
TypedWhenBranch {
index: Index,
index: HumanIndex,
region: Region,
},
TypedBody {
@ -1246,7 +1246,7 @@ impl AnnotationSource {
pub enum Reason {
FnArg {
name: Option<Symbol>,
arg_index: Index,
arg_index: HumanIndex,
},
FnCall {
name: Option<Symbol>,
@ -1254,28 +1254,28 @@ pub enum Reason {
},
LowLevelOpArg {
op: LowLevel,
arg_index: Index,
arg_index: HumanIndex,
},
ForeignCallArg {
foreign_symbol: ForeignSymbol,
arg_index: Index,
arg_index: HumanIndex,
},
FloatLiteral,
IntLiteral,
NumLiteral,
StrInterpolation,
WhenBranch {
index: Index,
index: HumanIndex,
},
WhenGuard,
ExpectCondition,
IfCondition,
IfBranch {
index: Index,
index: HumanIndex,
total_branches: usize,
},
ElemInList {
index: Index,
index: HumanIndex,
},
RecordUpdateValue(Lowercase),
RecordUpdateKeys(Symbol, SendMap<Lowercase, Region>),