comparison src/cjr_print.sml @ 1109:631a3597c065

Proper [un]urlification of unit
author Adam Chlipala <adamc@hcoop.net>
date Fri, 01 Jan 2010 12:48:06 -0500
parents 72670131dace
children 7fc4e0087e50
comparison
equal deleted inserted replaced
1108:82ac88b4e0a7 1109:631a3597c065
563 563
564 fun unurlify fromClient env (t, loc) = 564 fun unurlify fromClient env (t, loc) =
565 let 565 let
566 fun unurlify' rf t = 566 fun unurlify' rf t =
567 case t of 567 case t of
568 TFfi ("Basis", "unit") => string "uw_unit_v" 568 TFfi ("Basis", "unit") => string "uw_Basis_unurlifyUnit(ctx, &request)"
569 | TFfi ("Basis", "string") => string (if fromClient then 569 | TFfi ("Basis", "string") => string (if fromClient then
570 "uw_Basis_unurlifyString_fromClient(ctx, &request)" 570 "uw_Basis_unurlifyString_fromClient(ctx, &request)"
571 else 571 else
572 "uw_Basis_unurlifyString(ctx, &request)") 572 "uw_Basis_unurlifyString(ctx, &request)")
573 | TFfi (m, t) => string ("uw_" ^ ident m ^ "_unurlify" ^ capitalize t ^ "(ctx, &request)") 573 | TFfi (m, t) => string ("uw_" ^ ident m ^ "_unurlify" ^ capitalize t ^ "(ctx, &request)")
574 574
575 | TRecord 0 => string "uw_unit_v" 575 | TRecord 0 => string "uw_Basis_unurlifyUnit(ctx, &request)"
576 | TRecord i => 576 | TRecord i =>
577 let 577 let
578 val xts = E.lookupStruct env i 578 val xts = E.lookupStruct env i
579 in 579 in
580 box [string "({", 580 box [string "({",