comparison src/monoize.sml @ 106:d101cb1efe55

More with attributes and efficient serialization
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 15:49:14 -0400
parents da760c34f5ed
children 813e5a52063d
comparison
equal deleted inserted replaced
105:da760c34f5ed 106:d101cb1efe55
79 79
80 val dummyExp = (L'.EPrim (Prim.Int 0), E.dummySpan) 80 val dummyExp = (L'.EPrim (Prim.Int 0), E.dummySpan)
81 81
82 fun attrifyExp (e, tAll as (t, loc)) = 82 fun attrifyExp (e, tAll as (t, loc)) =
83 case t of 83 case t of
84 L'.TFfi ("Basis", "string") => e 84 L'.TFfi ("Basis", "string") => (L'.EFfiApp ("Basis", "attrifyString", [e]), loc)
85 | L'.TFfi ("Basis", "int") => (L'.EFfiApp ("Basis", "attrifyInt", [e]), loc) 85 | L'.TFfi ("Basis", "int") => (L'.EFfiApp ("Basis", "attrifyInt", [e]), loc)
86 | L'.TFfi ("Basis", "float") => (L'.EFfiApp ("Basis", "attrifyFloat", [e]), loc) 86 | L'.TFfi ("Basis", "float") => (L'.EFfiApp ("Basis", "attrifyFloat", [e]), loc)
87 | _ => (E.errorAt loc "Don't know how to encode attribute type"; 87 | _ => (E.errorAt loc "Don't know how to encode attribute type";
88 Print.eprefaces' [("Type", MonoPrint.p_typ MonoEnv.empty tAll)]; 88 Print.eprefaces' [("Type", MonoPrint.p_typ MonoEnv.empty tAll)];
89 dummyExp) 89 dummyExp)