diff src/monoize.sml @ 192:9bbf4d383381

Parametrized datatypes through corify
author Adam Chlipala <adamc@hcoop.net>
date Fri, 08 Aug 2008 10:59:06 -0400
parents 3eb53c957d10
children 8a70e2919e86
line wrap: on
line diff
--- a/src/monoize.sml	Fri Aug 08 10:28:32 2008 -0400
+++ b/src/monoize.sml	Fri Aug 08 10:59:06 2008 -0400
@@ -67,14 +67,14 @@
             (L'.TFfi ("Basis", "string"), loc)
 
           | L.CRel _ => poly ()
-          | L.CNamed n =>
-            let
+          | L.CNamed n => raise Fail "Monoize CNamed"
+            (*let
                 val (_, xncs) = Env.lookupDatatype env n
 
                 val xncs = map (fn (x, n, to) => (x, n, Option.map (monoType env) to)) xncs
             in
                 (L'.TDatatype (MonoUtil.classifyDatatype xncs, n, xncs), loc)
-            end
+            end*)
           | L.CFfi mx => (L'.TFfi mx, loc)
           | L.CApp _ => poly ()
           | L.CAbs _ => poly ()
@@ -206,7 +206,7 @@
                     let
                         fun makeDecl n fm =
                             let
-                                val (x, xncs) = Env.lookupDatatype env i
+                                val (x, xncs) = raise Fail "Monoize TDataype" (*Env.lookupDatatype env i*)
 
                                 val (branches, fm) =
                                     ListUtil.foldlMap
@@ -297,7 +297,7 @@
         L.PWild => (L'.PWild, loc)
       | L.PVar (x, t) => (L'.PVar (x, monoType env t), loc)
       | L.PPrim p => (L'.PPrim p, loc)
-      | L.PCon (dk, pc, po) => (L'.PCon (dk, monoPatCon env pc, Option.map (monoPat env) po), loc)
+      | L.PCon (dk, pc, _, po) => raise Fail "Monoize PCon" (*(L'.PCon (dk, monoPatCon env pc, Option.map (monoPat env) po), loc)*)
       | L.PRecord xps => (L'.PRecord (map (fn (x, p, t) => (x, monoPat env p, monoType env t)) xps), loc)
 
 fun monoExp (env, st, fm) (all as (e, loc)) =
@@ -311,8 +311,8 @@
             L.EPrim p => ((L'.EPrim p, loc), fm)
           | L.ERel n => ((L'.ERel n, loc), fm)
           | L.ENamed n => ((L'.ENamed n, loc), fm)
-          | L.ECon (dk, pc, eo) =>
-            let
+          | L.ECon (dk, pc, _, eo) => raise Fail "Monoize ECon"
+            (*let
                 val (eo, fm) =
                     case eo of
                         NONE => (NONE, fm)
@@ -324,7 +324,7 @@
                         end
             in
                 ((L'.ECon (dk, monoPatCon env pc, eo), loc), fm)
-            end
+            end*)
           | L.EFfi mx => ((L'.EFfi mx, loc), fm)
           | L.EFfiApp (m, x, es) =>
             let
@@ -718,12 +718,12 @@
     in
         case d of
             L.DCon _ => NONE
-          | L.DDatatype (x, n, xncs) =>
-            let
+          | L.DDatatype (x, n, _, xncs) => raise Fail "Monoize DDatatype"
+            (*let
                 val d = (L'.DDatatype (x, n, map (fn (x, n, to) => (x, n, Option.map (monoType env) to)) xncs), loc)
             in
                 SOME (Env.declBinds env all, fm, d)
-            end
+            end*)
           | L.DVal (x, n, t, e, s) =>
             let
                 val (e, fm) = monoExp (env, St.empty, fm) e