mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Parse effectful arrow in function annotations
This commit is contained in:
parent
1a5776653c
commit
ef4eeb5c1a
30 changed files with 178 additions and 19 deletions
|
@ -443,7 +443,8 @@ fn contains_unexposed_type(
|
|||
|
||||
Malformed(_) | Inferred | Wildcard | BoundVariable(_) => false,
|
||||
|
||||
Function(loc_args, loc_ret) => {
|
||||
Function(loc_args, _arrow, loc_ret) => {
|
||||
// [purity-inference] TODO: arrow
|
||||
let loc_args_contains_unexposed_type = loc_args.iter().any(|loc_arg| {
|
||||
contains_unexposed_type(&loc_arg.value, exposed_module_ids, module_ids)
|
||||
});
|
||||
|
@ -611,7 +612,8 @@ fn type_to_docs(in_func_type_ann: bool, type_annotation: ast::TypeAnnotation) ->
|
|||
ast::TypeAnnotation::SpaceAfter(&sub_type_ann, _) => {
|
||||
type_to_docs(in_func_type_ann, sub_type_ann)
|
||||
}
|
||||
ast::TypeAnnotation::Function(ast_arg_anns, output_ann) => {
|
||||
ast::TypeAnnotation::Function(ast_arg_anns, _arrow, output_ann) => {
|
||||
// [purity-inference] TODO: arrow
|
||||
let mut doc_arg_anns = Vec::new();
|
||||
|
||||
for ast_arg_ann in ast_arg_anns {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue