Improve some error messages
authorAdam Chlipala <adamc@hcoop.net>
Sun, 24 Feb 2008 21:58:17 +0000 (21:58 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sun, 24 Feb 2008 21:58:17 +0000 (21:58 +0000)
src/describe.sml
src/tycheck.sml

index 1e81550..11194af 100644 (file)
@@ -137,7 +137,7 @@ fun describe_type_error' loc te =
         Option.app (describe_unification_error t1) ueo)
       |        WrongForm (place, form, e, t, ueo) =>
        if form = "action" andalso will_be_action t then
         Option.app (describe_unification_error t1) ueo)
       |        WrongForm (place, form, e, t, ueo) =>
        if form = "action" andalso will_be_action t then
-           (ErrorMsg.error (SOME loc) "Not enough arguments passed to configuration function.";
+           (ErrorMsg.error (SOME loc) ("Not enough arguments passed to configuration function. (" ^ place ^ ")");
             preface (" Expression so far:", p_exp e);
             preface ("Next argument type:", p_typ (get_first_arg t)))
        else
             preface (" Expression so far:", p_exp e);
             preface ("Next argument type:", p_typ (get_first_arg t)))
        else
index d83a5c0..12efce3 100644 (file)
@@ -443,14 +443,14 @@ fun checkExp G (eAll as (e, loc)) =
                             (TAction (p', d', r'), loc)
                         end
                       | (TError, _) => t2
                             (TAction (p', d', r'), loc)
                         end
                       | (TError, _) => t2
-                      | _ => (dte (WrongForm ("Action to be sequenced",
+                      | _ => (dte (WrongForm ("First action to be sequenced",
                                               "action",
                                               e2,
                                               t2,
                                               NONE));
                               (TError, loc)))
                  | (TError, _) => t1
                                               "action",
                                               e2,
                                               t2,
                                               NONE));
                               (TError, loc)))
                  | (TError, _) => t1
-                 | _ => (dte (WrongForm ("Action to be sequenced",
+                 | _ => (dte (WrongForm ("Second action to be sequenced",
                                          "action",
                                          e1,
                                          t1,
                                          "action",
                                          e1,
                                          t1,
@@ -502,14 +502,14 @@ fun checkExp G (eAll as (e, loc)) =
                             (TAction (p', d', r2), loc)
                         end
                       | (TError, _) => t2
                             (TAction (p', d', r2), loc)
                         end
                       | (TError, _) => t2
-                      | _ => (dte (WrongForm ("Action to be sequenced",
+                      | _ => (dte (WrongForm ("Body of local settings",
                                               "action",
                                               e2,
                                               t2,
                                               NONE));
                               (TError, loc)))
                  | (TError, _) => t1
                                               "action",
                                               e2,
                                               t2,
                                               NONE));
                               (TError, loc)))
                  | (TError, _) => t1
-                 | _ => (dte (WrongForm ("Action to be sequenced",
+                 | _ => (dte (WrongForm ("Local settings",
                                          "action",
                                          e1,
                                          t1,
                                          "action",
                                          e1,
                                          t1,