equal
deleted
inserted
replaced
80 fun warn tok = |
80 fun warn tok = |
81 (case tok of |
81 (case tok of |
82 Token (_, (Keyword, ":>")) => |
82 Token (_, (Keyword, ":>")) => |
83 warning ("Opaque signature matching (:>) fails to work with ML pretty printing --\n\ |
83 warning ("Opaque signature matching (:>) fails to work with ML pretty printing --\n\ |
84 \prefer non-opaque matching (:) possibly with abstype" ^ |
84 \prefer non-opaque matching (:) possibly with abstype" ^ |
85 Position.str_of (pos_of tok)) |
85 Position.here (pos_of tok)) |
86 | _ => ()); |
86 | _ => ()); |
87 |
87 |
88 fun check_content_of tok = |
88 fun check_content_of tok = |
89 (case kind_of tok of |
89 (case kind_of tok of |
90 Error msg => error msg |
90 Error msg => error msg |
305 |> Source.exhaust |
305 |> Source.exhaust |
306 |> tap (Position.reports_text o Antiquote.reports_of (single o report_of_token)) |
306 |> tap (Position.reports_text o Antiquote.reports_of (single o report_of_token)) |
307 |> tap Antiquote.check_nesting |
307 |> tap Antiquote.check_nesting |
308 |> tap (List.app (fn Antiquote.Text tok => (check_content_of tok; warn tok) | _ => ()))) |
308 |> tap (List.app (fn Antiquote.Text tok => (check_content_of tok; warn tok) | _ => ()))) |
309 handle ERROR msg => |
309 handle ERROR msg => |
310 cat_error msg ("The error(s) above occurred in ML source" ^ Position.str_of pos); |
310 cat_error msg ("The error(s) above occurred in ML source" ^ Position.here pos); |
311 in input @ termination end; |
311 in input @ termination end; |
312 |
312 |
313 end; |
313 end; |
314 |
314 |
315 end; |
315 end; |