summaryrefslogtreecommitdiff
path: root/src/elab_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-01-26 16:02:47 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-01-26 16:02:47 -0500
commite7e2ffc58a4f120801ae69217032948e511af213 (patch)
tree347ed14f320df53657cab27568e54eac47107d22 /src/elab_print.sml
parent95beeda12defe36c4d4df42d3dee3bd753e19ff5 (diff)
Elaborating files
Diffstat (limited to 'src/elab_print.sml')
-rw-r--r--src/elab_print.sml32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/elab_print.sml b/src/elab_print.sml
index 18d01695..58a342e2 100644
--- a/src/elab_print.sml
+++ b/src/elab_print.sml
@@ -128,24 +128,26 @@ and p_con env = p_con' false env
fun p_decl env ((d, _) : decl) =
case d of
- DCon (x, k, c) => box [string "con",
- space,
- string x,
- space,
- string "::",
- space,
- p_kind k,
- space,
- string "=",
- space,
- p_con env c]
+ DCon (x, n, k, c) => box [string "con",
+ space,
+ string x,
+ string "__",
+ string (Int.toString n),
+ space,
+ string "::",
+ space,
+ p_kind k,
+ space,
+ string "=",
+ space,
+ p_con env c]
fun p_file env file =
let
- val (_, pds) = foldr (fn (d, (env, pds)) =>
- (ElabUtil.declBinds env d,
- p_decl env d :: pds))
- (env, []) file
+ val (_, pds) = ListUtil.mapfoldl (fn (d, env) =>
+ (ElabUtil.declBinds env d,
+ p_decl env d))
+ env file
in
p_list_sep newline (fn x => x) pds
end