mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Apply review suggestions
This commit is contained in:
parent
d165052e64
commit
fe99d20be5
3 changed files with 8 additions and 14 deletions
|
@ -147,12 +147,7 @@ impl<'a> Env<'a> {
|
||||||
let exposed_values = exposed_ids
|
let exposed_values = exposed_ids
|
||||||
.idents()
|
.idents()
|
||||||
.filter(|(_, ident)| {
|
.filter(|(_, ident)| {
|
||||||
ident
|
ident.as_ref().starts_with(|c: char| c.is_lowercase())
|
||||||
.as_ref()
|
|
||||||
.chars()
|
|
||||||
.next()
|
|
||||||
.filter(|c| c.is_lowercase())
|
|
||||||
.is_some()
|
|
||||||
})
|
})
|
||||||
.map(|(_, ident)| Lowercase::from(ident.as_ref()))
|
.map(|(_, ident)| Lowercase::from(ident.as_ref()))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
|
@ -112,12 +112,7 @@ impl<'a> Env<'a> {
|
||||||
let exposed_values = exposed_ids
|
let exposed_values = exposed_ids
|
||||||
.idents()
|
.idents()
|
||||||
.filter(|(_, ident)| {
|
.filter(|(_, ident)| {
|
||||||
ident
|
ident.as_ref().starts_with(|c: char| c.is_lowercase())
|
||||||
.as_ref()
|
|
||||||
.chars()
|
|
||||||
.next()
|
|
||||||
.filter(|c| c.is_lowercase())
|
|
||||||
.is_some()
|
|
||||||
})
|
})
|
||||||
.map(|(_, ident)| Lowercase::from(ident.as_ref()))
|
.map(|(_, ident)| Lowercase::from(ident.as_ref()))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
|
@ -990,7 +990,9 @@ define_builtins! {
|
||||||
2 BOOL: "Bool" => {
|
2 BOOL: "Bool" => {
|
||||||
0 BOOL_BOOL: "Bool" imported // the Bool.Bool type alias
|
0 BOOL_BOOL: "Bool" imported // the Bool.Bool type alias
|
||||||
1 BOOL_FALSE: "False" imported // Bool.Bool = [ False, True ]
|
1 BOOL_FALSE: "False" imported // Bool.Bool = [ False, True ]
|
||||||
|
// NB: not strictly needed; used for finding global tag names in error suggestions
|
||||||
2 BOOL_TRUE: "True" imported // Bool.Bool = [ False, True ]
|
2 BOOL_TRUE: "True" imported // Bool.Bool = [ False, True ]
|
||||||
|
// NB: not strictly needed; used for finding global tag names in error suggestions
|
||||||
3 BOOL_AND: "and"
|
3 BOOL_AND: "and"
|
||||||
4 BOOL_OR: "or"
|
4 BOOL_OR: "or"
|
||||||
5 BOOL_NOT: "not"
|
5 BOOL_NOT: "not"
|
||||||
|
@ -1079,8 +1081,10 @@ define_builtins! {
|
||||||
}
|
}
|
||||||
5 RESULT: "Result" => {
|
5 RESULT: "Result" => {
|
||||||
0 RESULT_RESULT: "Result" imported // the Result.Result type alias
|
0 RESULT_RESULT: "Result" imported // the Result.Result type alias
|
||||||
1 RESULT_OK: "Ok" imported // Result.Result = [ Ok a, Err e ]
|
1 RESULT_OK: "Ok" imported // Result.Result a e = [ Ok a, Err e ]
|
||||||
2 RESULT_ERR: "Err" imported // Result.Result = [ Ok a, Err e ]
|
// NB: not strictly needed; used for finding global tag names in error suggestions
|
||||||
|
2 RESULT_ERR: "Err" imported // Result.Result a e = [ Ok a, Err e ]
|
||||||
|
// NB: not strictly needed; used for finding global tag names in error suggestions
|
||||||
3 RESULT_MAP: "map"
|
3 RESULT_MAP: "map"
|
||||||
4 RESULT_MAP_ERR: "mapErr"
|
4 RESULT_MAP_ERR: "mapErr"
|
||||||
5 RESULT_WITH_DEFAULT: "withDefault"
|
5 RESULT_WITH_DEFAULT: "withDefault"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue