6 |
6 |
7 signature EXPRESSION = |
7 signature EXPRESSION = |
8 sig |
8 sig |
9 datatype 'term map = Positional of 'term option list | Named of (string * 'term) list; |
9 datatype 'term map = Positional of 'term option list | Named of (string * 'term) list; |
10 type 'term expr = (string * ((string * bool) * 'term map)) list; |
10 type 'term expr = (string * ((string * bool) * 'term map)) list; |
|
11 type expression_i = term expr * (Binding.T * typ option * mixfix) list; |
11 type expression = string expr * (Binding.T * string option * mixfix) list; |
12 type expression = string expr * (Binding.T * string option * mixfix) list; |
12 type expression_i = term expr * (Binding.T * typ option * mixfix) list; |
|
13 |
13 |
14 (* Processing of context statements *) |
14 (* Processing of context statements *) |
15 val read_statement: Element.context list -> (string * string list) list list -> |
15 val read_statement: Element.context list -> (string * string list) list list -> |
16 Proof.context -> (term * term list) list list * Proof.context; |
16 Proof.context -> (term * term list) list list * Proof.context; |
17 val cert_statement: Element.context_i list -> (term * term list) list list -> |
17 val cert_statement: Element.context_i list -> (term * term list) list list -> |
18 Proof.context -> (term * term list) list list * Proof.context; |
18 Proof.context -> (term * term list) list list * Proof.context; |
19 |
19 |
20 (* Declaring locales *) |
20 (* Declaring locales *) |
|
21 val add_locale: string -> bstring -> expression_i -> Element.context_i list -> |
|
22 theory -> string * local_theory; |
21 val add_locale_cmd: string -> bstring -> expression -> Element.context list -> |
23 val add_locale_cmd: string -> bstring -> expression -> Element.context list -> |
22 theory -> string * local_theory; |
24 theory -> string * local_theory; |
23 val add_locale: string -> bstring -> expression_i -> Element.context_i list -> |
|
24 theory -> string * local_theory; |
|
25 |
25 |
26 (* Interpretation *) |
26 (* Interpretation *) |
|
27 val sublocale: string -> expression_i -> theory -> Proof.state; |
27 val sublocale_cmd: string -> expression -> theory -> Proof.state; |
28 val sublocale_cmd: string -> expression -> theory -> Proof.state; |
28 val sublocale: string -> expression_i -> theory -> Proof.state; |
29 val interpretation: expression_i -> (Attrib.binding * term) list -> |
|
30 theory -> Proof.state; |
29 val interpretation_cmd: expression -> (Attrib.binding * string) list -> |
31 val interpretation_cmd: expression -> (Attrib.binding * string) list -> |
30 theory -> Proof.state; |
32 theory -> Proof.state; |
31 val interpretation: expression_i -> (Attrib.binding * term) list -> |
33 val interpret: expression_i -> bool -> Proof.state -> Proof.state; |
32 theory -> Proof.state; |
|
33 val interpret_cmd: expression -> bool -> Proof.state -> Proof.state; |
34 val interpret_cmd: expression -> bool -> Proof.state -> Proof.state; |
34 val interpret: expression_i -> bool -> Proof.state -> Proof.state; |
|
35 end; |
35 end; |
36 |
36 |
37 |
37 |
38 structure Expression : EXPRESSION = |
38 structure Expression : EXPRESSION = |
39 struct |
39 struct |