File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ let structure_item_of_expr ~loc expr =
43
43
pstr_loc= loc;
44
44
}
45
45
46
- let map_comprehension ~loc extension_name body comp_list : extension =
46
+ let map_comprehension ~loc :orig_loc extension_name body comp_list : extension =
47
+ let loc = { orig_loc with Location. loc_ghost = true } in
47
48
(* This is unreachable and just used as a place holder.*)
48
49
let unreachable =
49
50
{
@@ -86,7 +87,7 @@ let map_comprehension ~loc extension_name body comp_list : extension=
86
87
) comp_list
87
88
in
88
89
let payload = PStr ((structure_item_of_expr ~loc body)::list ) in
89
- { txt= extension_name; loc; }, payload
90
+ { txt= extension_name; loc= orig_loc ; }, payload
90
91
91
92
let unwrap_expression ~loc = function
92
93
| Pstr_eval (exp , _ ) -> exp
@@ -162,7 +163,7 @@ let report_error ~loc = function
162
163
| Extension_not_existent extension_name ->
163
164
Location. errorf ~loc " Extension %s does not exsist." extension_name
164
165
| Illegal_comprehension_extension_construct ->
165
- Location. errorf ~loc " Wrong extension sytax for comprehensions."
166
+ Location. errorf ~loc " Wrong extension syntax for comprehensions."
166
167
167
168
let () =
168
169
Location. register_error_of_exn
You can’t perform that action at this time.
0 commit comments