[project @ 1998-04-14 12:26:11 by simonpj]
authorsimonpj <unknown>
Tue, 14 Apr 1998 12:26:11 +0000 (12:26 +0000)
committersimonpj <unknown>
Tue, 14 Apr 1998 12:26:11 +0000 (12:26 +0000)
Fix error in Specialise.dictRhsFVs

ghc/compiler/specialise/Specialise.lhs

index 6041340..04cd693 100644 (file)
@@ -891,6 +891,9 @@ data UsageDetails
     }
 
 type DictBind = (DictVar, CoreExpr, TyVarSet, FreeDicts)
+                       -- The FreeDicts are the free dictionaries (only)
+                       -- of the RHS of the dictionary bindings
+                       -- Similarly the TyVarSet
 
 emptyUDs = MkUD { dict_binds = emptyBag, calls = emptyFM }
 
@@ -1109,6 +1112,11 @@ dictRhsFVs e
                                        -- These case expressions are of the form
                                        --   case d of { D a b c -> b }
 
+    go (Lam _ _)          = emptyIdSet -- This can happen for a Functor "dict",
+                                       -- which is represented by the function
+                                       -- itself; but it won't have any further
+                                       -- dicts inside it.  I hope.
+
     go other              = pprPanic "dictRhsFVs" (ppr e)