comparison src/core_print.sml @ 39:02f42e9a1825

Corify removes modules
author Adam Chlipala <adamc@hcoop.net>
date Thu, 19 Jun 2008 12:39:22 -0400
parents 1c91c5e6840f
children 0a5c312de09a
comparison
equal deleted inserted replaced
38:d16ef24de78b 39:02f42e9a1825
77 string "}"] 77 string "}"]
78 | TRecord c => box [string "$", 78 | TRecord c => box [string "$",
79 p_con' true env c] 79 p_con' true env c]
80 80
81 | CRel n => 81 | CRel n =>
82 if !debug then 82 ((if !debug then
83 string (#1 (E.lookupCRel env n) ^ "_" ^ Int.toString n) 83 string (#1 (E.lookupCRel env n) ^ "_" ^ Int.toString n)
84 else 84 else
85 string (#1 (E.lookupCRel env n)) 85 string (#1 (E.lookupCRel env n)))
86 handle E.UnboundRel _ => string ("UNBOUND_" ^ Int.toString n))
86 | CNamed n => 87 | CNamed n =>
87 if !debug then 88 ((if !debug then
88 string (#1 (E.lookupCNamed env n) ^ "__" ^ Int.toString n) 89 string (#1 (E.lookupCNamed env n) ^ "__" ^ Int.toString n)
89 else 90 else
90 string (#1 (E.lookupCNamed env n)) 91 string (#1 (E.lookupCNamed env n)))
92 handle E.UnboundNamed _ => string ("UNBOUNDN_" ^ Int.toString n))
91 93
92 | CApp (c1, c2) => parenIf par (box [p_con env c1, 94 | CApp (c1, c2) => parenIf par (box [p_con env c1,
93 space, 95 space,
94 p_con' true env c2]) 96 p_con' true env c2])
95 | CAbs (x, k, c) => parenIf par (box [string "fn", 97 | CAbs (x, k, c) => parenIf par (box [string "fn",
141 143
142 fun p_exp' par env (e, _) = 144 fun p_exp' par env (e, _) =
143 case e of 145 case e of
144 EPrim p => Prim.p_t p 146 EPrim p => Prim.p_t p
145 | ERel n => 147 | ERel n =>
146 if !debug then 148 ((if !debug then
147 string (#1 (E.lookupERel env n) ^ "_" ^ Int.toString n) 149 string (#1 (E.lookupERel env n) ^ "_" ^ Int.toString n)
148 else 150 else
149 string (#1 (E.lookupERel env n)) 151 string (#1 (E.lookupERel env n)))
152 handle E.UnboundRel _ => string ("UNBOUND_" ^ Int.toString n))
150 | ENamed n => 153 | ENamed n =>
151 if !debug then 154 ((if !debug then
152 string (#1 (E.lookupENamed env n) ^ "__" ^ Int.toString n) 155 string (#1 (E.lookupENamed env n) ^ "__" ^ Int.toString n)
153 else 156 else
154 string (#1 (E.lookupENamed env n)) 157 string (#1 (E.lookupENamed env n)))
158 handle E.UnboundNamed _ => string ("UNBOUNDN_" ^ Int.toString n))
155 | EApp (e1, e2) => parenIf par (box [p_exp env e1, 159 | EApp (e1, e2) => parenIf par (box [p_exp env e1,
156 space, 160 space,
157 p_exp' true env e2]) 161 p_exp' true env e2])
158 | EAbs (x, t, _, e) => parenIf par (box [string "fn", 162 | EAbs (x, t, _, e) => parenIf par (box [string "fn",
159 space, 163 space,