comparison src/expl_print.sml @ 64:d609820c5834

Proper hiding of shadowed bindings in principal signatures
author Adam Chlipala <adamc@hcoop.net>
date Thu, 26 Jun 2008 08:54:49 -0400
parents 0a5c312de09a
children c1e21ab42896
comparison
equal deleted inserted replaced
63:c5a503ad0d8c 64:d609820c5834
273 | SgiStr (x, n, sgn) => box [string "structure", 273 | SgiStr (x, n, sgn) => box [string "structure",
274 space, 274 space,
275 p_named x n, 275 p_named x n,
276 space, 276 space,
277 string ":", 277 string ":",
278 space,
279 p_sgn env sgn]
280 | SgiSgn (x, n, sgn) => box [string "signature",
281 space,
282 p_named x n,
283 space,
284 string "=",
278 space, 285 space,
279 p_sgn env sgn] 286 p_sgn env sgn]
280 287
281 and p_sgn env (sgn, _) = 288 and p_sgn env (sgn, _) =
282 case sgn of 289 case sgn of
315 string x, 322 string x,
316 space, 323 space,
317 string "=", 324 string "=",
318 space, 325 space,
319 p_con env c] 326 p_con env c]
327 | SgnProj (m1, ms, x) =>
328 let
329 val (m1x, sgn) = E.lookupStrNamed env m1
330
331 val m1s = if !debug then
332 m1x ^ "__" ^ Int.toString m1
333 else
334 m1x
335 in
336 p_list_sep (string ".") string (m1x :: ms @ [x])
337 end
320 338
321 fun p_decl env ((d, _) : decl) = 339 fun p_decl env ((d, _) : decl) =
322 case d of 340 case d of
323 DCon (x, n, k, c) => box [string "con", 341 DCon (x, n, k, c) => box [string "con",
324 space, 342 space,