comparison src/monoize.sml @ 198:ab86aa858e6c

'Option' datatype encoding
author Adam Chlipala <adamc@hcoop.net>
date Sat, 09 Aug 2008 19:23:31 -0400
parents 890a61991263
children 5dbba661deab
comparison
equal deleted inserted replaced
197:b1b9bcfd8c42 198:ab86aa858e6c
82 val dtmap' = IM.insert (dtmap, n, r) 82 val dtmap' = IM.insert (dtmap, n, r)
83 83
84 val xncs = map (fn (x, n, to) => (x, n, Option.map (mt env dtmap') to)) xncs 84 val xncs = map (fn (x, n, to) => (x, n, Option.map (mt env dtmap') to)) xncs
85 in 85 in
86 case xs of 86 case xs of
87 [] =>(r := (MonoUtil.classifyDatatype xncs, xncs); 87 [] =>(r := (ElabUtil.classifyDatatype xncs, xncs);
88 (L'.TDatatype (n, r), loc)) 88 (L'.TDatatype (n, r), loc))
89 | _ => poly () 89 | _ => poly ()
90 end) 90 end)
91 | L.CFfi mx => (L'.TFfi mx, loc) 91 | L.CFfi mx => (L'.TFfi mx, loc)
92 | L.CApp _ => poly () 92 | L.CApp _ => poly ()