diff options
author | 2008-08-08 10:59:06 -0400 | |
---|---|---|
committer | 2008-08-08 10:59:06 -0400 | |
commit | e2a9136ed7123cb8e5cac4a20cbce5467643ecd6 (patch) | |
tree | cf96ee150816d9120f27370837c836e5641bbdd9 /src/monoize.sml | |
parent | baf22271ef6e646c97ddfa1e4193a8857816c67d (diff) |
Parametrized datatypes through corify
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 4b45ff44..aef65135 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -67,14 +67,14 @@ fun monoType env (all as (c, loc)) = (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 @@ fun fooifyExp fk env = 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 @@ fun monoPat env (p, loc) = 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 @@ fun monoExp (env, st, fm) (all as (e, loc)) = 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 @@ fun monoExp (env, st, fm) (all as (e, loc)) = 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 @@ fun monoDecl (env, fm) (all as (d, loc)) = 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 |