comparison src/elab_print.sml @ 59:abb2b32c19fb

Subsignatures
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Jun 2008 19:10:38 -0400
parents 0a5c312de09a
children 9f89f0b00b84
comparison
equal deleted inserted replaced
58:fd8a81ecd598 59:abb2b32c19fb
290 | SgiStr (x, n, sgn) => box [string "structure", 290 | SgiStr (x, n, sgn) => box [string "structure",
291 space, 291 space,
292 p_named x n, 292 p_named x n,
293 space, 293 space,
294 string ":", 294 string ":",
295 space,
296 p_sgn env sgn]
297 | SgiSgn (x, n, sgn) => box [string "signature",
298 space,
299 p_named x n,
300 space,
301 string "=",
295 space, 302 space,
296 p_sgn env sgn] 303 p_sgn env sgn]
297 304
298 and p_sgn env (sgn, _) = 305 and p_sgn env (sgn, _) =
299 case sgn of 306 case sgn of
332 string x, 339 string x,
333 space, 340 space,
334 string "=", 341 string "=",
335 space, 342 space,
336 p_con env c] 343 p_con env c]
344 | SgnProj (m1, ms, x) =>
345 let
346 val (m1x, sgn) = E.lookupStrNamed env m1
347
348 val m1s = if !debug then
349 m1x ^ "__" ^ Int.toString m1
350 else
351 m1x
352 in
353 p_list_sep (string ".") string (m1x :: ms @ [x])
354 end
337 | SgnError => string "<ERROR>" 355 | SgnError => string "<ERROR>"
338 356
339 fun p_decl env ((d, _) : decl) = 357 fun p_decl env ((d, _) : decl) =
340 case d of 358 case d of
341 DCon (x, n, k, c) => box [string "con", 359 DCon (x, n, k, c) => box [string "con",