23571
|
1 |
(* Title: Pure/ProofGeneral/pgip_types.ML
|
|
2 |
ID: $Id$
|
|
3 |
Author: David Aspinall
|
|
4 |
|
|
5 |
PGIP abstraction: marshalling between PGML and Isabelle types
|
|
6 |
*)
|
|
7 |
|
|
8 |
signature PGML_ISABELLE =
|
|
9 |
sig
|
23610
|
10 |
(* val pgml_of_prettyT : Pretty.T -> Pgml.pgmlterm *)
|
23571
|
11 |
end
|
|
12 |
|
|
13 |
structure PgmlIsabelle : PGML_ISABELLE =
|
|
14 |
struct
|
|
15 |
open Pgml;
|
23610
|
16 |
open Pretty;
|
23571
|
17 |
|
23610
|
18 |
(* fun pgml_of_prettyT1 (Block(ts,ind,length)) =
|
|
19 |
Box {orient = SOME HVOrient, indent = SOME ind, content = map pgml_of_prettyT1 ts}
|
23571
|
20 |
|
23610
|
21 |
| pgml_of_prettyT1 (String (str,len)) = Atoms { kind = NONE, content = [Str str] }
|
23571
|
22 |
(* TODO: should unquote symbols *)
|
|
23 |
|
23610
|
24 |
| pgml_of_prettyT1 (Break (flag,ind)) = Pgml.Break { mandatory = SOME flag, indent = SOME ind }
|
|
25 |
|
|
26 |
val pgml_of_prettyT = pgml_of_prettyT1 o dest_prettyT;
|
|
27 |
*)
|
23571
|
28 |
end
|