comparison src/cjr_print.sml @ 1075:0657e5adc938

Convert to task syntax
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Dec 2009 10:19:05 -0500
parents b2311dfb3158
children db52c32dbe42
comparison
equal deleted inserted replaced
1074:d89f98f0b4bb 1075:0657e5adc938
2097 space, 2097 space,
2098 string s, 2098 string s,
2099 space, 2099 space,
2100 string "*/"] 2100 string "*/"]
2101 2101
2102 | DInitializer _ => box [] 2102 | DTask _ => box []
2103 2103
2104 datatype 'a search = 2104 datatype 'a search =
2105 Found of 'a 2105 Found of 'a
2106 | NotFound 2106 | NotFound
2107 | Error 2107 | Error
2731 string "return 0;", 2731 string "return 0;",
2732 newline], 2732 newline],
2733 string "}", 2733 string "}",
2734 newline] 2734 newline]
2735 2735
2736 val initializers = List.mapPartial (fn (DInitializer e, _) => SOME e | _ => NONE) ds 2736 val initializers = List.mapPartial (fn (DTask (Initialize, e), _) => SOME e | _ => NONE) ds
2737 in 2737 in
2738 box [string "#include <stdio.h>", 2738 box [string "#include <stdio.h>",
2739 newline, 2739 newline,
2740 string "#include <stdlib.h>", 2740 string "#include <stdlib.h>",
2741 newline, 2741 newline,