Skip to content

Commit

Permalink
Simplify formatting of "spec at" and "defn at" diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewFluet committed Sep 14, 2017
1 parent e76223c commit 76bf730
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/guide/src/Emacs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ error messages.
(add-to-list 'compilation-error-regexp-alist 'mlton)
(add-to-list 'compilation-error-regexp-alist-alist
'(mlton
"^[[:space:]]*\\(\\(?:\\(Error: \\)\\|\\(Warning: \\)\\|\\(\\(?:defn\\|spec\\) at:[[:space:]]+\\)\\)\\(.+\\) \\([0-9]+\\)\\.\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\.\\([0-9]+\\)\\)?\\.?\\)$"
"^[[:space:]]*\\(\\(?:\\(Error: \\)\\|\\(Warning: \\)\\|\\(\\(?:defn\\|spec\\) at: \\)\\)\\(.+\\) \\([0-9]+\\)\\.\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\.\\([0-9]+\\)\\)?\\.?\\)$"
5 (6 . 8) (7 . 9) (3 . 4) 1))
----
8 changes: 4 additions & 4 deletions mlton/elaborate/elaborate-env.fun
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,7 @@ fun transparentCut (E: t, S: Structure.t, I: Interface.t,
| SOME spec => seq [str "signature: ", spec])::
(List.map
(specs (ifcName, ifcRange), fn r =>
seq [str "spec at: ", Region.layout r])))))
seq [str "spec at: ", Region.layout r])))))
in
{domain = ifcName,
range = range,
Expand Down Expand Up @@ -3113,13 +3113,13 @@ fun transparentCut (E: t, S: Structure.t, I: Interface.t,
str "): ",
layoutLongRev (strids, Ast.Tycon.layout sigName)],
align ((seq [str "structure: ", strError]) ::
(seq [str "defn at: ",
(seq [str "defn at: ",
Region.layout (Ast.Tycon.region strName)]) ::
(seq [str "signature: ", sigError]) ::
(List.map
((Ast.Tycon.region sigName)::
(Interface.TypeStr.specs sigStr),
fn r => seq [str "spec at: ", Region.layout r]))))
fn r => seq [str "spec at: ", Region.layout r]))))
val error = fn (msg, strError, sigError) =>
let
val msgs =
Expand Down Expand Up @@ -3477,7 +3477,7 @@ fun transparentCut (E: t, S: Structure.t, I: Interface.t,
then " : "
else ": "),
ty],
seq [str kind, str " at: ",
seq [str kind, str " at: ",
Region.layout (Ast.Vid.region vid)]]
end
in
Expand Down
2 changes: 1 addition & 1 deletion mlton/elaborate/interface.fun
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ structure TypeStr =
(seq [str "type spec: ", keyword, tyvars, lay (), rest])::
(List.map
(spec::(specs tyStr), fn r =>
seq [str "spec at: ", Region.layout r]))
seq [str "spec at: ", Region.layout r]))
end

fun getFlex {oper: string,
Expand Down

0 comments on commit 76bf730

Please sign in to comment.