16 |
structure SS = SymbolSet |
structure SS = SymbolSet |
17 |
structure S = Symbol |
structure S = Symbol |
18 |
structure SP = GenericVC.SymPath |
structure SP = GenericVC.SymPath |
19 |
structure PU = PickleUtil |
structure PU = PickleUtilFn (type 'a map = unit val emptyMap = ()) |
20 |
|
structure PSym = PickleSymbolFn (structure PU = PU) |
21 |
structure UU = UnpickleUtil |
structure UU = UnpickleUtil |
22 |
|
|
23 |
infix 3 $ |
infix 3 $ |
48 |
|
|
49 |
fun write_decl (s, d) = let |
fun write_decl (s, d) = let |
50 |
|
|
51 |
val symbol = PU.w_symbol |
val symbol = PSym.w_symbol |
52 |
val list = PU.w_list |
val list = PU.w_list |
53 |
|
|
54 |
fun path (SP.SPATH p) = list symbol p |
fun path (SP.SPATH p) = list symbol p |
77 |
m arg |
m arg |
78 |
end |
end |
79 |
|
|
80 |
val pickle = s2b (PU.pickle () (decl d)) |
val pickle = s2b (PU.pickle (decl d)) |
81 |
in |
in |
82 |
BinIO.output (s, Byte.stringToBytes version); |
BinIO.output (s, Byte.stringToBytes version); |
83 |
BinIO.output (s, pickle) |
BinIO.output (s, pickle) |
89 |
|
|
90 |
val session = UU.mkSession (UU.stringGetter (b2s (BinIO.inputAll s))) |
val session = UU.mkSession (UU.stringGetter (b2s (BinIO.inputAll s))) |
91 |
|
|
92 |
val symbol = UU.r_symbol session |
val string = UU.r_string session |
93 |
|
val symbol = UnpickleSymbol.r_symbol (session, string) |
94 |
fun list m r = UU.r_list session m r |
fun list m r = UU.r_list session m r |
95 |
fun share m f = UU.share session m f |
fun share m f = UU.share session m f |
96 |
|
|