summaryrefslogtreecommitdiff
path: root/src/elab_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-12 17:35:51 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-12 17:35:51 -0400
commited9e3cb10161dde86a87894155f2f74c60d28c4a (patch)
tree6720f063434c521f4004809f3a557aa8b86a23ce /src/elab_print.sml
parent2355b20a32d8ed4924cee84a44831061b2b49b49 (diff)
Matching values in signatures
Diffstat (limited to 'src/elab_print.sml')
-rw-r--r--src/elab_print.sml13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/elab_print.sml b/src/elab_print.sml
index c07631a0..435ea13d 100644
--- a/src/elab_print.sml
+++ b/src/elab_print.sml
@@ -275,7 +275,14 @@ and p_sgn env (sgn, _) =
case sgn of
SgnConst sgis => box [string "sig",
newline,
- p_list_sep newline (p_sgn_item env) sgis,
+ let
+ val (psgis, _) = ListUtil.foldlMap (fn (sgi, env) =>
+ (p_sgn_item env sgi,
+ E.sgiBinds env sgi))
+ env sgis
+ in
+ p_list_sep newline (fn x => x) psgis
+ end,
newline,
string "end"]
| SgnVar n => string (#1 (E.lookupSgnNamed env n))
@@ -329,13 +336,13 @@ and p_str env (str, _) =
case str of
StrConst ds => box [string "struct",
newline,
- p_list_sep newline (p_decl env) ds,
+ p_file env ds,
newline,
string "end"]
| StrVar n => string (#1 (E.lookupStrNamed env n))
| StrError => string "<ERROR>"
-fun p_file env file =
+and p_file env file =
let
val (pds, _) = ListUtil.foldlMap (fn (d, env) =>
(p_decl env d,