do not choke on type variables emerging during rewriting
authorhaftmann
Fri, 28 Jun 2013 21:07:32 +0200
changeset 52473 a2407f62a29f
parent 52472 3a43a8b1ecb0
child 52474 9c7f760d06c2
do not choke on type variables emerging during rewriting
src/Tools/nbe.ML
--- a/src/Tools/nbe.ML	Fri Jun 28 14:51:19 2013 +0200
+++ b/src/Tools/nbe.ML	Fri Jun 28 21:07:32 2013 +0200
@@ -133,12 +133,13 @@
     val algebra = Sign.classes_of thy;
     val triv_classes = get_triv_classes thy;
     val vs = Term.add_tfrees t [];
-  in t
+  in
+    t
     |> (map_types o map_type_tfree)
         (fn (v, sort) => TFree (v, Sorts.inter_sort algebra (sort, triv_classes)))
     |> rew
     |> (map_types o map_type_tfree)
-        (fn (v, _) => TFree (v, the (AList.lookup (op =) vs v)))
+        (fn (v, sort) => TFree (v, the_default sort (AList.lookup (op =) vs v)))
   end;
 
 end;