comparison src/corify.sml @ 100:f0f59e918cac

page declaration, up through monoize
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 10:11:35 -0400
parents 275aaeb73f1f
children 5f04adf47f48
comparison
equal deleted inserted replaced
99:5182f0c80d2e 100:f0f59e918cac
425 in 425 in
426 (rev ds, st) 426 (rev ds, st)
427 end 427 end
428 | _ => raise Fail "Non-const signature for FFI structure") 428 | _ => raise Fail "Non-const signature for FFI structure")
429 429
430 | L.DPage (c, e) => ([(L'.DPage (corifyCon st c, corifyExp st e), loc)], st)
430 431
431 and corifyStr ((str, _), st) = 432 and corifyStr ((str, _), st) =
432 case str of 433 case str of
433 L.StrConst ds => 434 L.StrConst ds =>
434 let 435 let
471 case d of 472 case d of
472 L.DCon (_, n', _, _) => Int.max (n, n') 473 L.DCon (_, n', _, _) => Int.max (n, n')
473 | L.DVal (_, n', _ , _) => Int.max (n, n') 474 | L.DVal (_, n', _ , _) => Int.max (n, n')
474 | L.DSgn (_, n', _) => Int.max (n, n') 475 | L.DSgn (_, n', _) => Int.max (n, n')
475 | L.DStr (_, n', _, str) => Int.max (n, Int.max (n', maxNameStr str)) 476 | L.DStr (_, n', _, str) => Int.max (n, Int.max (n', maxNameStr str))
476 | L.DFfiStr (_, n', _) => Int.max (n, n')) 477 | L.DFfiStr (_, n', _) => Int.max (n, n')
478 | L.DPage _ => n)
477 0 ds 479 0 ds
478 480
479 and maxNameStr (str, _) = 481 and maxNameStr (str, _) =
480 case str of 482 case str of
481 L.StrConst ds => maxName ds 483 L.StrConst ds => maxName ds