mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
make record variable names clearer
This commit is contained in:
parent
1a8f380033
commit
e62ddc9ef5
5 changed files with 29 additions and 17 deletions
|
@ -85,7 +85,10 @@ pub enum Expr {
|
|||
),
|
||||
|
||||
// Product Types
|
||||
Record(Variable, SendMap<Lowercase, Field>),
|
||||
Record {
|
||||
record_var: Variable,
|
||||
fields: SendMap<Lowercase, Field>,
|
||||
},
|
||||
|
||||
/// Empty record constant
|
||||
EmptyRecord,
|
||||
|
@ -195,7 +198,13 @@ pub fn canonicalize_expr<'a>(
|
|||
} else {
|
||||
let (can_fields, output) = canonicalize_fields(env, var_store, scope, fields);
|
||||
|
||||
(Record(var_store.fresh(), can_fields), output)
|
||||
(
|
||||
Record {
|
||||
record_var: var_store.fresh(),
|
||||
fields: can_fields,
|
||||
},
|
||||
output,
|
||||
)
|
||||
}
|
||||
}
|
||||
ast::Expr::Str(string) => (Str((*string).into()), Output::default()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue