changeset 490:366676f7bc88

More ThreadedBlog progress
author Adam Chlipala <adamc@hcoop.net>
date Tue, 11 Nov 2008 16:27:51 -0500
parents 463dad880470
children 0fd65c50e0e2
files src/monoize.sml src/unnest.sml
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/monoize.sml	Tue Nov 11 15:32:10 2008 -0500
+++ b/src/monoize.sml	Tue Nov 11 16:27:51 2008 -0500
@@ -406,7 +406,7 @@
                          fm)
                     end
 
-                  | _ => (E.errorAt loc "Don't know how to encode attribute type";
+                  | _ => (E.errorAt loc "Don't know how to encode attribute/URL type";
                           Print.eprefaces' [("Type", MonoPrint.p_typ MonoEnv.empty tAll)];
                           (dummyExp, fm))
     in
--- a/src/unnest.sml	Tue Nov 11 15:32:10 2008 -0500
+++ b/src/unnest.sml	Tue Nov 11 16:27:51 2008 -0500
@@ -206,6 +206,14 @@
                             val loc = #2 ed
 
                             val nr = length vis
+                            val subsLocal = List.filter (fn (_, (ERel _, _)) => false
+                                                          | _ => true) subs
+                            val subsLocal = map (fn (n, e) => (n + nr, liftExpInExp nr 0 e))
+                                                subsLocal
+
+                            val vis = map (fn (x, t, e) =>
+                                              (x, t, doSubst' (e, subsLocal))) vis
+
                             val (cfv, efv) = foldl (fn ((_, t, e), (cfv, efv)) =>
                                                        let
                                                            val (cfv', efv') = fvsExp nr e
@@ -243,15 +251,12 @@
                                                        maxName + 1))
                                 maxName vis
 
-
-
                             val subs = map (fn (n, e) => (n + nr,
                                                           case e of
                                                               (ERel _, _) => e
                                                             | _ => liftExpInExp nr 0 e))
                                            subs
 
-
                             val subs' = ListUtil.mapi (fn (i, (_, n, _, _)) =>
                                                           let
                                                               val e = (ENamed n, loc)
@@ -278,7 +283,7 @@
                                               let
                                                   (*val () = Print.prefaces "preSubst"
                                                                           [("e", ElabPrint.p_exp E.empty e)]*)
-                                                  val e = doSubst' (e, subs)
+                                                  val e = doSubst' (e, subs')
 
                                                   (*val () = Print.prefaces "squishCon"
                                                                           [("t", ElabPrint.p_con E.empty t)]*)