SCM Repository
[smlnj] Diff of /sml/trunk/src/cm/pgraph/gen-sml.sml
Diff of /sml/trunk/src/cm/pgraph/gen-sml.sml
Parent Directory
|
Revision Log
|
Patch
19 |
nativesrc: string -> string, |
nativesrc: string -> string, |
20 |
importstructs: string list, |
importstructs: string list, |
21 |
outstream: TextIO.outstream, |
outstream: TextIO.outstream, |
22 |
exportprefix: string } -> unit |
exportprefix: string, |
23 |
|
use_toplocal: bool } -> unit |
24 |
end = struct |
end = struct |
25 |
|
|
26 |
type typ = string |
type typ = string |
58 |
nativesrc, |
nativesrc, |
59 |
importstructs, |
importstructs, |
60 |
outstream = outs, |
outstream = outs, |
61 |
exportprefix } = args |
exportprefix, |
62 |
|
use_toplocal } = args |
63 |
|
|
64 |
|
val (xlocal, xin, xend) = |
65 |
|
if use_toplocal then ("local", "in", "end") |
66 |
|
else ("(* local *)", "(* in *)", "(* end *)") |
67 |
|
|
68 |
fun out l = app (fn s => TextIO.output (outs, s)) l |
fun out l = app (fn s => TextIO.output (outs, s)) l |
69 |
|
|
122 |
copy () |
copy () |
123 |
end |
end |
124 |
in |
in |
125 |
out ["local\n"]; |
out [xlocal, "\n"]; |
126 |
SM.appi genimport e; |
SM.appi genimport e; |
127 |
out ["in\n"]; |
out [xin, "\n"]; |
128 |
copyfile src; |
copyfile src; |
129 |
genexport (oss, fmt) |
genexport (oss, fmt) |
130 |
before out ["end\n"] |
before out [xend, "\n"] |
131 |
end |
end |
132 |
|
|
133 |
fun filter (e, ss) = SM.filteri (fn (sy, _) => SS.member (ss, sy)) e |
fun filter (e, ss) = SM.filteri (fn (sy, _) => SS.member (ss, sy)) e |
|
Legend:
Removed from v.1058 |
|
changed lines |
|
Added in v.1059 |
|
|