Mercurial > urweb
comparison src/cjr_print.sml @ 290:df00701f2323
'read' type class
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 07 Sep 2008 11:53:30 -0400 |
parents | 4260ad920c36 |
children | 6e665c7c96f6 |
comparison
equal
deleted
inserted
replaced
289:0cc956a3216f | 290:df00701f2323 |
---|---|
518 newline], | 518 newline], |
519 string "tmp;", | 519 string "tmp;", |
520 newline, | 520 newline, |
521 string "})"] | 521 string "})"] |
522 end | 522 end |
523 | ESome (t, e) => | |
524 (case #1 t of | |
525 TDatatype _ => p_exp' par env e | |
526 | TFfi ("Basis", "string") => p_exp' par env e | |
527 | _ => box [string "({", | |
528 newline, | |
529 p_typ env t, | |
530 space, | |
531 string "*tmp", | |
532 space, | |
533 string "=", | |
534 space, | |
535 string "lw_malloc(ctx, sizeof(", | |
536 p_typ env t, | |
537 string "));", | |
538 newline, | |
539 string "*tmp", | |
540 space, | |
541 string "=", | |
542 p_exp' par env e, | |
543 string ";", | |
544 newline, | |
545 string "tmp;", | |
546 newline, | |
547 string "})"]) | |
523 | 548 |
524 | EFfi (m, x) => box [string "lw_", string m, string "_", string x] | 549 | EFfi (m, x) => box [string "lw_", string m, string "_", string x] |
525 | EError (e, t) => | 550 | EError (e, t) => |
526 box [string "({", | 551 box [string "({", |
527 newline, | 552 newline, |