repaired order of variable node allocation
authorhaftmann
Mon, 23 Feb 2009 21:34:14 +0100
changeset 30075 ff5b4900d9a5
parent 30074 38ce654e1b05
child 30077 c5920259850c
repaired order of variable node allocation
src/Tools/code/code_wellsorted.ML
--- a/src/Tools/code/code_wellsorted.ML	Mon Feb 23 10:42:31 2009 -0800
+++ b/src/Tools/code/code_wellsorted.ML	Mon Feb 23 21:34:14 2009 +0100
@@ -166,11 +166,13 @@
   in
     vardeps_data
     |> (apsnd o apsnd) (insert (op =) inst)
+    |> fold_index (fn (k, classes) =>
+         apfst (Vargraph.new_node ((Inst (class, tyco), k), ([] ,[])))
+         ) classess
     |> fold (fn superclass => assert_inst thy arities eqngr (superclass, tyco)) superclasses
     |> fold (assert_fun thy arities eqngr) inst_params
     |> fold_index (fn (k, classes) =>
-         apfst (Vargraph.new_node ((Inst (class, tyco), k), ([] ,[])))
-         #> add_classes thy arities eqngr (Inst (class, tyco), k) classes
+         add_classes thy arities eqngr (Inst (class, tyco), k) classes
          #> fold (fn superclass =>
              add_dep thy arities eqngr (Inst (superclass, tyco), k)
              (Inst (class, tyco), k)) superclasses