equal
deleted
inserted
replaced
45 val empty_algebra: algebra |
45 val empty_algebra: algebra |
46 val merge_algebra: Pretty.pp -> algebra * algebra -> algebra |
46 val merge_algebra: Pretty.pp -> algebra * algebra -> algebra |
47 val subalgebra: Pretty.pp -> (class -> bool) -> (class * string -> sort list) |
47 val subalgebra: Pretty.pp -> (class -> bool) -> (class * string -> sort list) |
48 -> algebra -> (sort -> sort) * algebra |
48 -> algebra -> (sort -> sort) * algebra |
49 type class_error |
49 type class_error |
|
50 val msg_class_error: Pretty.pp -> class_error -> string |
50 val class_error: Pretty.pp -> class_error -> 'a |
51 val class_error: Pretty.pp -> class_error -> 'a |
51 exception CLASS_ERROR of class_error |
52 exception CLASS_ERROR of class_error |
52 val mg_domain: algebra -> string -> sort -> sort list (*exception CLASS_ERROR*) |
53 val mg_domain: algebra -> string -> sort -> sort list (*exception CLASS_ERROR*) |
53 val of_sort: algebra -> typ * sort -> bool |
54 val of_sort: algebra -> typ * sort -> bool |
54 val of_sort_derivation: Pretty.pp -> algebra -> |
55 val of_sort_derivation: Pretty.pp -> algebra -> |
304 |
305 |
305 (* errors *) |
306 (* errors *) |
306 |
307 |
307 datatype class_error = NoClassrel of class * class | NoArity of string * class; |
308 datatype class_error = NoClassrel of class * class | NoArity of string * class; |
308 |
309 |
309 fun class_error pp (NoClassrel (c1, c2)) = |
310 fun msg_class_error pp (NoClassrel (c1, c2)) = |
310 error ("No class relation " ^ Pretty.string_of_classrel pp [c1, c2]) |
311 "No class relation " ^ Pretty.string_of_classrel pp [c1, c2] |
311 | class_error pp (NoArity (a, c)) = |
312 | msg_class_error pp (NoArity (a, c)) = |
312 error ("No type arity " ^ Pretty.string_of_arity pp (a, [], [c])); |
313 "No type arity " ^ Pretty.string_of_arity pp (a, [], [c]); |
|
314 |
|
315 fun class_error pp = error o msg_class_error pp; |
313 |
316 |
314 exception CLASS_ERROR of class_error; |
317 exception CLASS_ERROR of class_error; |
315 |
318 |
316 |
319 |
317 (* mg_domain *) |
320 (* mg_domain *) |