src/Pure/ProofGeneral/pgml_isabelle.ML
author wenzelm
Tue, 10 Jul 2007 23:29:43 +0200
changeset 23719 ccd9cb15c062
parent 23610 5ade06703b07
child 23800 ec6f7a398625
permissions -rw-r--r--
more markup for inner and outer syntax; added enclose;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23571
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     1
(*  Title:      Pure/ProofGeneral/pgip_types.ML
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     2
    ID:         $Id$
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     3
    Author:     David Aspinall
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     4
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     5
PGIP abstraction: marshalling between PGML and Isabelle types
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     6
*)
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     7
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     8
signature PGML_ISABELLE =
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
     9
sig
23610
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    10
(*    val pgml_of_prettyT : Pretty.T -> Pgml.pgmlterm *)
23571
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    11
end
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    12
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    13
structure PgmlIsabelle : PGML_ISABELLE =
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    14
struct
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    15
   open Pgml;
23610
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    16
   open Pretty;
23571
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    17
23610
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    18
(*   fun pgml_of_prettyT1 (Block(ts,ind,length)) =
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    19
       Box {orient = SOME HVOrient, indent = SOME ind, content = map pgml_of_prettyT1 ts}
23571
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    20
23610
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    21
     | pgml_of_prettyT1 (String (str,len)) = Atoms { kind = NONE, content = [Str str] }  
23571
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    22
					    (* TODO: should unquote symbols *)
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    23
23610
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    24
     | pgml_of_prettyT1 (Break (flag,ind)) = Pgml.Break { mandatory = SOME flag, indent = SOME ind }
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    25
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    26
   val pgml_of_prettyT = pgml_of_prettyT1 o dest_prettyT;
5ade06703b07 Produce good PGML 2.0
aspinall
parents: 23571
diff changeset
    27
*)
23571
0cd175710a93 PGML abstraction, draft version
aspinall
parents:
diff changeset
    28
end