comparison src/core_util.sml @ 87:275aaeb73f1f

Push KUnit and CUnit through the phases
author Adam Chlipala <adamc@hcoop.net>
date Tue, 01 Jul 2008 13:23:46 -0400
parents 8b611ecc5f2d
children f0f59e918cac
comparison
equal deleted inserted replaced
86:7f9bcc8bfa1e 87:275aaeb73f1f
53 53
54 | KRecord k => 54 | KRecord k =>
55 S.map2 (mfk k, 55 S.map2 (mfk k,
56 fn k' => 56 fn k' =>
57 (KRecord k', loc)) 57 (KRecord k', loc))
58
59 | KUnit => S.return2 kAll
58 in 60 in
59 mfk 61 mfk
60 end 62 end
61 63
62 fun map f k = 64 fun map f k =
147 S.bind2 (mfk k1, 149 S.bind2 (mfk k1,
148 fn k1' => 150 fn k1' =>
149 S.map2 (mfk k2, 151 S.map2 (mfk k2,
150 fn k2' => 152 fn k2' =>
151 (CFold (k1', k2'), loc))) 153 (CFold (k1', k2'), loc)))
154
155 | CUnit => S.return2 cAll
152 in 156 in
153 mfc 157 mfc
154 end 158 end
155 159
156 fun mapfold {kind = fk, con = fc} = 160 fun mapfold {kind = fk, con = fc} =