File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 199ff196aa1c90c865a40c96438335f84a00de4c
2
+ refs/heads/master: 91b1885ba2a82cd1ac3701a71bb47bf6b7ddd8e9
Original file line number Diff line number Diff line change @@ -997,16 +997,19 @@ let rec pretty_ty_str (cx:ctxt) (fallback:(Ast.ty -> string)) (ty:Ast.ty) =
997
997
in
998
998
let fields = Array. to_list (Array. map format_field fields) in
999
999
" rec(" ^ (String. concat " , " fields) ^ " )"
1000
- | Ast. TY_fn (fnsig , _ ) ->
1000
+ | Ast. TY_fn (fnsig , aux ) ->
1001
1001
let format_slot slot =
1002
1002
match slot.Ast. slot_ty with
1003
1003
None -> Common. bug () " no ty in slot"
1004
1004
| Some ty' -> pretty_ty_str cx fallback ty'
1005
1005
in
1006
+ let effect = aux.Ast. fn_effect in
1007
+ let qual = Fmt. sprintf_fmt Ast. fmt_effect_qual () effect in
1008
+ let keyword = if aux.Ast. fn_is_iter then " iter" else " fn" in
1006
1009
let fn_args = Array. map format_slot fnsig.Ast. sig_input_slots in
1007
1010
let fn_args_str = String. concat " , " (Array. to_list fn_args) in
1008
1011
let fn_rv_str = format_slot fnsig.Ast. sig_output_slot in
1009
- Printf. sprintf " fn (%s) -> %s" fn_args_str fn_rv_str
1012
+ Printf. sprintf " %s%s (%s) -> %s" qual keyword fn_args_str fn_rv_str
1010
1013
| Ast. TY_tag { Ast. tag_id = tag_id; Ast. tag_args = _ }
1011
1014
when Hashtbl. mem cx.ctxt_user_tag_names tag_id ->
1012
1015
let name = Hashtbl. find cx.ctxt_user_tag_names tag_id in
You can’t perform that action at this time.
0 commit comments