| -> where

This commit is contained in:
Bryce Miller 2023-06-05 20:19:00 -04:00
parent fd846b9a7a
commit cb08225bf0
No known key found for this signature in database
GPG key ID: F1E97BF8DF152350
117 changed files with 637 additions and 612 deletions

View file

@ -602,7 +602,13 @@ fn variable_to_string(
ctx.able_variables.sort();
ctx.able_variables.dedup();
for (i, (var, abilities)) in ctx.able_variables.into_iter().enumerate() {
buf.push_str(if i == 0 { " | " } else { ", " });
if i == 0 {
buf.push(' ');
buf.push_str(roc_parse::keyword::WHERE)
} else {
buf.push(',');
}
buf.push(' ');
buf.push_str(var);
buf.push(' ');
buf.push_str(roc_parse::keyword::IMPLEMENTS);

View file

@ -1760,7 +1760,7 @@ pub enum Type {
}
/// A lambda set under an arrow in a ability member signature. For example, in
/// Default has default : {} -> a | a implements Default
/// Default has default : {} -> a where a implements Default
/// the unspecialized lambda set for the arrow "{} -> a" would be `a:default:1`.
///
/// Lambda sets in member signatures are never known until those members are specialized at a