Mercurial > urweb
comparison src/source_print.sml @ 67:9f89f0b00b84
Elaborating cfold
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 26 Jun 2008 09:48:54 -0400 |
parents | 48b6d2c3df46 |
children | 6431b315a1e3 |
comparison
equal
deleted
inserted
replaced
66:1ec5703c09c4 | 67:9f89f0b00b84 |
---|---|
90 | 90 |
91 | CVar (ss, s) => p_list_sep (string ".") string (ss @ [s]) | 91 | CVar (ss, s) => p_list_sep (string ".") string (ss @ [s]) |
92 | CApp (c1, c2) => parenIf par (box [p_con c1, | 92 | CApp (c1, c2) => parenIf par (box [p_con c1, |
93 space, | 93 space, |
94 p_con' true c2]) | 94 p_con' true c2]) |
95 | CAbs (x, k, c) => parenIf par (box [string "fn", | 95 | CAbs (x, NONE, c) => parenIf par (box [string "fn", |
96 space, | 96 space, |
97 string x, | 97 string x, |
98 space, | 98 space, |
99 string "::", | 99 string "=>", |
100 space, | 100 space, |
101 p_kind k, | 101 p_con c]) |
102 space, | 102 | CAbs (x, SOME k, c) => parenIf par (box [string "fn", |
103 string "=>", | 103 space, |
104 space, | 104 string x, |
105 p_con c]) | 105 space, |
106 string "::", | |
107 space, | |
108 p_kind k, | |
109 space, | |
110 string "=>", | |
111 space, | |
112 p_con c]) | |
106 | 113 |
107 | CName s => box [string "#", string s] | 114 | CName s => box [string "#", string s] |
108 | 115 |
109 | CRecord xcs => box [string "[", | 116 | CRecord xcs => box [string "[", |
110 p_list (fn (x, c) => | 117 p_list (fn (x, c) => |
117 | CConcat (c1, c2) => parenIf par (box [p_con' true c1, | 124 | CConcat (c1, c2) => parenIf par (box [p_con' true c1, |
118 space, | 125 space, |
119 string "++", | 126 string "++", |
120 space, | 127 space, |
121 p_con c2]) | 128 p_con c2]) |
129 | CFold => string "fold" | |
122 | CWild k => box [string "(_", | 130 | CWild k => box [string "(_", |
123 space, | 131 space, |
124 string "::", | 132 string "::", |
125 space, | 133 space, |
126 p_kind k] | 134 p_kind k] |