Mercurial > urweb
comparison src/cjr_print.sml @ 476:c9566d49ecfe
Handle EError returning a function; handle multiple cookies in one input header
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 08 Nov 2008 12:12:50 -0500 |
parents | 20fab0e96217 |
children | 8e055bbbd28b |
comparison
equal
deleted
inserted
replaced
475:9babc5d2ec5a | 476:c9566d49ecfe |
---|---|
68 | TFfi ("Basis", "string") => true | 68 | TFfi ("Basis", "string") => true |
69 | _ => false | 69 | _ => false |
70 | 70 |
71 fun p_typ' par env (t, loc) = | 71 fun p_typ' par env (t, loc) = |
72 case t of | 72 case t of |
73 TFun (t1, t2) => parenIf par (box [string "(", | 73 TFun (t1, t2) => (EM.errorAt loc "Function type remains"; |
74 p_typ' true env t2, | 74 string "<FUNCTION>") |
75 space, | |
76 string "(*)", | |
77 space, | |
78 string "(", | |
79 p_typ env t1, | |
80 string "))"]) | |
81 | TRecord i => box [string "struct", | 75 | TRecord i => box [string "struct", |
82 space, | 76 space, |
83 string "__uws_", | 77 string "__uws_", |
84 string (Int.toString i)] | 78 string (Int.toString i)] |
85 | TDatatype (Enum, n, _) => | 79 | TDatatype (Enum, n, _) => |
965 string ");", | 959 string ");", |
966 newline, | 960 newline, |
967 string "tmp;", | 961 string "tmp;", |
968 newline, | 962 newline, |
969 string "})"] | 963 string "})"] |
964 | EApp ((EError (e, (TFun (_, ran), _)), loc), _) => | |
965 p_exp env (EError (e, ran), loc) | |
966 | |
970 | EFfiApp (m, x, es) => box [string "uw_", | 967 | EFfiApp (m, x, es) => box [string "uw_", |
971 p_ident m, | 968 p_ident m, |
972 string "_", | 969 string "_", |
973 p_ident x, | 970 p_ident x, |
974 string "(ctx, ", | 971 string "(ctx, ", |