Mercurial > urweb
comparison src/elab_err.sml @ 413:6a0e54400805
Sum prose
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 21 Oct 2008 19:56:20 -0400 |
parents | 075b36dbb1a4 |
children | 588b9d16b00a |
comparison
equal
deleted
inserted
replaced
412:df4cbd90a26e | 413:6a0e54400805 |
---|---|
107 datatype cunify_error = | 107 datatype cunify_error = |
108 CKind of kind * kind * kunify_error | 108 CKind of kind * kind * kunify_error |
109 | COccursCheckFailed of con * con | 109 | COccursCheckFailed of con * con |
110 | CIncompatible of con * con | 110 | CIncompatible of con * con |
111 | CExplicitness of con * con | 111 | CExplicitness of con * con |
112 | CKindof of kind * con | 112 | CKindof of kind * con * string |
113 | CRecordFailure of con * con | 113 | CRecordFailure of con * con |
114 | 114 |
115 fun cunifyError env err = | 115 fun cunifyError env err = |
116 case err of | 116 case err of |
117 CKind (k1, k2, kerr) => | 117 CKind (k1, k2, kerr) => |
129 ("Con 2", p_con env c2)] | 129 ("Con 2", p_con env c2)] |
130 | CExplicitness (c1, c2) => | 130 | CExplicitness (c1, c2) => |
131 eprefaces "Differing constructor function explicitness" | 131 eprefaces "Differing constructor function explicitness" |
132 [("Con 1", p_con env c1), | 132 [("Con 1", p_con env c1), |
133 ("Con 2", p_con env c2)] | 133 ("Con 2", p_con env c2)] |
134 | CKindof (k, c) => | 134 | CKindof (k, c, expected) => |
135 eprefaces "Unexpected kind for kindof calculation" | 135 eprefaces ("Unexpected kind for kindof calculation (expecting " ^ expected ^ ")") |
136 [("Kind", p_kind k), | 136 [("Kind", p_kind k), |
137 ("Con", p_con env c)] | 137 ("Con", p_con env c)] |
138 | CRecordFailure (c1, c2) => | 138 | CRecordFailure (c1, c2) => |
139 eprefaces "Can't unify record constructors" | 139 eprefaces "Can't unify record constructors" |
140 [("Summary 1", p_con env c1), | 140 [("Summary 1", p_con env c1), |