Ensure that unification variables alloc'd during solving are untouchable
[ghc-hetmet.git] / compiler / typecheck / TcInteract.lhs
index 44e8479..fd3cc1e 100644 (file)
@@ -1,6 +1,6 @@
 \begin{code}
 module TcInteract ( 
-     solveInteract, AtomicInert, 
+     solveInteract, AtomicInert, tyVarsOfInert,
      InertSet, emptyInert, updInertSet, extractUnsolved, solveOne, foldISEqCts
   ) where  
 
@@ -134,6 +134,14 @@ data InertSet
                                              -- and reside either in the worklist or in the inerts 
        }
 
+tyVarsOfInert :: InertSet -> TcTyVarSet 
+tyVarsOfInert (IS { inert_eqs    = eqs
+                  , inert_dicts  = dictmap
+                  , inert_ips    = ipmap
+                  , inert_funeqs = funeqmap }) = tyVarsOfCanonicals cts 
+  where cts = eqs `andCCan` cCanMapToBag dictmap 
+                  `andCCan` cCanMapToBag ipmap `andCCan` cCanMapToBag funeqmap
+
 type FDImprovement  = (PredType,PredType) 
 type FDImprovements = [(PredType,PredType)]