comparison src/cjrize.sml @ 198:ab86aa858e6c

'Option' datatype encoding
author Adam Chlipala <adamc@hcoop.net>
date Sat, 09 Aug 2008 19:23:31 -0400
parents 890a61991263
children 326fb4686f60
comparison
equal deleted inserted replaced
197:b1b9bcfd8c42 198:ab86aa858e6c
280 280
281 fun cifyDecl ((d, loc), sm) = 281 fun cifyDecl ((d, loc), sm) =
282 case d of 282 case d of
283 L.DDatatype (x, n, xncs) => 283 L.DDatatype (x, n, xncs) =>
284 let 284 let
285 val dk = MonoUtil.classifyDatatype xncs 285 val dk = ElabUtil.classifyDatatype xncs
286 val (xncs, sm) = ListUtil.foldlMap (fn ((x, n, to), sm) => 286 val (xncs, sm) = ListUtil.foldlMap (fn ((x, n, to), sm) =>
287 case to of 287 case to of
288 NONE => ((x, n, NONE), sm) 288 NONE => ((x, n, NONE), sm)
289 | SOME t => 289 | SOME t =>
290 let 290 let