summaryrefslogtreecommitdiff
path: root/src/elab_err.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-10-27 08:36:31 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-10-27 08:36:31 -0400
commit4b4b367f011e9f49389d76c2167c193711713438 (patch)
treefbff54b6d2e52247b2f2b1003d6265e32f18c57e /src/elab_err.sml
parent3c6dc3613a00da2f302ed3e8a295438eedd3e649 (diff)
Harmonize have/need terminology in error messages; display canceled record summaries on errors
Diffstat (limited to 'src/elab_err.sml')
-rw-r--r--src/elab_err.sml24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/elab_err.sml b/src/elab_err.sml
index 1194f817..00f1e4fc 100644
--- a/src/elab_err.sml
+++ b/src/elab_err.sml
@@ -127,29 +127,29 @@ fun cunifyError env err =
case err of
CKind (k1, k2, kerr) =>
(eprefaces "Kind unification failure"
- [("Kind 1", p_kind env k1),
- ("Kind 2", p_kind env k2)];
+ [("Have", p_kind env k1),
+ ("Need", p_kind env k2)];
kunifyError env kerr)
| COccursCheckFailed (c1, c2) =>
eprefaces "Constructor occurs check failed"
- [("Con 1", p_con env c1),
- ("Con 2", p_con env c2)]
+ [("Have", p_con env c1),
+ ("Need", p_con env c2)]
| CIncompatible (c1, c2) =>
eprefaces "Incompatible constructors"
- [("Con 1", p_con env c1),
- ("Con 2", p_con env c2)]
+ [("Have", p_con env c1),
+ ("Need", p_con env c2)]
| CExplicitness (c1, c2) =>
eprefaces "Differing constructor function explicitness"
- [("Con 1", p_con env c1),
- ("Con 2", p_con env c2)]
+ [("Have", p_con env c1),
+ ("Need", p_con env c2)]
| CKindof (k, c, expected) =>
eprefaces ("Unexpected kind for kindof calculation (expecting " ^ expected ^ ")")
[("Kind", p_kind env k),
("Con", p_con env c)]
| CRecordFailure (c1, c2, fo) =>
(eprefaces "Can't unify record constructors"
- (("Summary 1", p_con env c1)
- :: ("Summary 2", p_con env c2)
+ (("Have", p_con env c1)
+ :: ("Need", p_con env c2)
:: (case fo of
NONE => []
| SOME (nm, t1, t2, _) =>
@@ -210,8 +210,8 @@ fun expError env err =
("Type", p_con env t)])
| IncompatibleCons (c1, c2) =>
(ErrorMsg.errorAt (#2 c1) "Incompatible constructors";
- eprefaces' [("Con 1", p_con env c1),
- ("Con 2", p_con env c2)])
+ eprefaces' [("Have", p_con env c1),
+ ("Need", p_con env c2)])
| DuplicatePatternVariable (loc, s) =>
ErrorMsg.errorAt loc ("Duplicate pattern variable " ^ s)
| PatUnify (p, c1, c2, uerr) =>