equal
deleted
inserted
replaced
20 val morphism: string -> |
20 val morphism: string -> |
21 {binding: (binding -> binding) list, |
21 {binding: (binding -> binding) list, |
22 typ: (typ -> typ) list, |
22 typ: (typ -> typ) list, |
23 term: (term -> term) list, |
23 term: (term -> term) list, |
24 fact: (thm list -> thm list) list} -> morphism |
24 fact: (thm list -> thm list) list} -> morphism |
|
25 val is_identity: morphism -> bool |
25 val pretty: morphism -> Pretty.T |
26 val pretty: morphism -> Pretty.T |
26 val binding: morphism -> binding -> binding |
27 val binding: morphism -> binding -> binding |
27 val binding_prefix: morphism -> (string * bool) list |
28 val binding_prefix: morphism -> (string * bool) list |
28 val typ: morphism -> typ -> typ |
29 val typ: morphism -> typ -> typ |
29 val term: morphism -> term -> term |
30 val term: morphism -> term -> term |
79 names = if a = "" then [] else [a], |
80 names = if a = "" then [] else [a], |
80 binding = map (pair a) binding, |
81 binding = map (pair a) binding, |
81 typ = map (pair a) typ, |
82 typ = map (pair a) typ, |
82 term = map (pair a) term, |
83 term = map (pair a) term, |
83 fact = map (pair a) fact}; |
84 fact = map (pair a) fact}; |
|
85 |
|
86 (*syntactic test only!*) |
|
87 fun is_identity (Morphism {names, binding, typ, term, fact}) = |
|
88 null names andalso null binding andalso null typ andalso null term andalso null fact; |
84 |
89 |
85 fun pretty (Morphism {names, ...}) = Pretty.enum ";" "{" "}" (map Pretty.str (rev names)); |
90 fun pretty (Morphism {names, ...}) = Pretty.enum ";" "{" "}" (map Pretty.str (rev names)); |
86 |
91 |
87 val _ = ML_system_pp (fn _ => fn _ => Pretty.to_polyml o pretty); |
92 val _ = ML_system_pp (fn _ => fn _ => Pretty.to_polyml o pretty); |
88 |
93 |