diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-08-02 13:48:26 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-08-02 13:48:26 -0400 |
commit | 949fe8f9ce90257cd354c2d19d611cbcc3b569ef (patch) | |
tree | 7f1afca8ccf70a28b34907d8f7b0744c6c763081 | |
parent | d727966ce805067e227fa96262005056fdfac448 (diff) |
A few error message improvements
-rw-r--r-- | src/elab_err.sml | 4 | ||||
-rw-r--r-- | src/marshalcheck.sml | 4 | ||||
-rw-r--r-- | tests/disallowed.ur | 3 | ||||
-rw-r--r-- | tests/undet.ur | 1 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/elab_err.sml b/src/elab_err.sml index a03bc096..1194f817 100644 --- a/src/elab_err.sml +++ b/src/elab_err.sml @@ -267,10 +267,10 @@ val p_decl = P.p_decl fun declError env err = case err of KunifsRemain ds => - (ErrorMsg.errorAt (lspan ds) "Some kind unification variables are undetermined in declaration"; + (ErrorMsg.errorAt (lspan ds) "Some kind unification variables are undetermined in declaration\n(look for them as \"<UNIF:...>\")"; eprefaces' [("Decl", p_list_sep PD.newline (p_decl env) ds)]) | CunifsRemain ds => - (ErrorMsg.errorAt (lspan ds) "Some constructor unification variables are undetermined in declaration"; + (ErrorMsg.errorAt (lspan ds) "Some constructor unification variables are undetermined in declaration\n(look for them as \"<UNIF:...>\")"; eprefaces' [("Decl", p_list_sep PD.newline (p_decl env) ds)]) | Nonpositive d => (ErrorMsg.errorAt (#2 d) "Non-strictly-positive datatype declaration (could allow non-termination)"; diff --git a/src/marshalcheck.sml b/src/marshalcheck.sml index eadbfa49..8d7edd15 100644 --- a/src/marshalcheck.sml +++ b/src/marshalcheck.sml @@ -108,7 +108,7 @@ fun check file = () else E.error ("Input to exported function '" - ^ tag ^ "' involves one or more disallowed types: " + ^ tag ^ "' involves one or more types that are disallowed for page handler inputs: " ^ PS.toString s); (cmap, emap) end) @@ -120,7 +120,7 @@ fun check file = if PS.isEmpty s then () else - E.error ("Cookie '" ^ tag ^ "' includes one or more disallowed types: " + E.error ("Cookie '" ^ tag ^ "' includes one or more types that are disallowed for cookies: " ^ PS.toString s); (cmap, emap) end diff --git a/tests/disallowed.ur b/tests/disallowed.ur new file mode 100644 index 00000000..a673a2aa --- /dev/null +++ b/tests/disallowed.ur @@ -0,0 +1,3 @@ +cookie bad : url + +fun worse (x : url) : transaction page = return <xml/> diff --git a/tests/undet.ur b/tests/undet.ur new file mode 100644 index 00000000..7dba0ee6 --- /dev/null +++ b/tests/undet.ur @@ -0,0 +1 @@ +fun main () : transaction _ = return <xml/> |