mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Build derive keys for derivable records
This commit is contained in:
parent
275391c065
commit
aa5e1e6a27
5 changed files with 51 additions and 17 deletions
|
@ -1,3 +1,4 @@
|
|||
use roc_module::ident::Lowercase;
|
||||
use roc_types::subs::{Content, Subs, Variable};
|
||||
|
||||
use crate::DeriveError;
|
||||
|
@ -17,3 +18,15 @@ pub(crate) fn check_empty_ext_var(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn debug_name_record(fields: &[Lowercase]) -> String {
|
||||
let mut str = String::from('{');
|
||||
fields.iter().enumerate().for_each(|(i, f)| {
|
||||
if i > 0 {
|
||||
str.push(',');
|
||||
}
|
||||
str.push_str(f.as_str());
|
||||
});
|
||||
str.push('}');
|
||||
str
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue