equal
deleted
inserted
replaced
33 val witness_sorts: tsig -> sort list -> sort list -> (typ * sort) list |
33 val witness_sorts: tsig -> sort list -> sort list -> (typ * sort) list |
34 type mode |
34 type mode |
35 val mode_default: mode |
35 val mode_default: mode |
36 val mode_syntax: mode |
36 val mode_syntax: mode |
37 val mode_abbrev: mode |
37 val mode_abbrev: mode |
|
38 val get_mode: Proof.context -> mode |
|
39 val set_mode: mode -> Proof.context -> Proof.context |
|
40 val restore_mode: Proof.context -> Proof.context -> Proof.context |
38 val cert_typ_mode: mode -> tsig -> typ -> typ |
41 val cert_typ_mode: mode -> tsig -> typ -> typ |
39 val cert_typ: tsig -> typ -> typ |
42 val cert_typ: tsig -> typ -> typ |
40 val arity_number: tsig -> string -> int |
43 val arity_number: tsig -> string -> int |
41 val arity_sorts: Pretty.pp -> tsig -> string -> sort -> sort list |
44 val arity_sorts: Pretty.pp -> tsig -> string -> sort -> sort list |
42 |
45 |
152 datatype mode = Mode of {normalize: bool, logical: bool}; |
155 datatype mode = Mode of {normalize: bool, logical: bool}; |
153 |
156 |
154 val mode_default = Mode {normalize = true, logical = true}; |
157 val mode_default = Mode {normalize = true, logical = true}; |
155 val mode_syntax = Mode {normalize = true, logical = false}; |
158 val mode_syntax = Mode {normalize = true, logical = false}; |
156 val mode_abbrev = Mode {normalize = false, logical = false}; |
159 val mode_abbrev = Mode {normalize = false, logical = false}; |
|
160 |
|
161 structure Mode = ProofDataFun |
|
162 ( |
|
163 type T = mode; |
|
164 fun init _ = mode_default; |
|
165 ); |
|
166 |
|
167 val get_mode = Mode.get; |
|
168 fun set_mode mode = Mode.map (K mode); |
|
169 fun restore_mode ctxt = set_mode (get_mode ctxt); |
157 |
170 |
158 |
171 |
159 (* certified types *) |
172 (* certified types *) |
160 |
173 |
161 fun bad_nargs t = "Bad number of arguments for type constructor: " ^ quote t; |
174 fun bad_nargs t = "Bad number of arguments for type constructor: " ^ quote t; |