diff options
Diffstat (limited to 'ghc/compiler/rename/RnEnv.lhs')
-rw-r--r-- | ghc/compiler/rename/RnEnv.lhs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ghc/compiler/rename/RnEnv.lhs b/ghc/compiler/rename/RnEnv.lhs index a7fd614386..affbcc9e91 100644 --- a/ghc/compiler/rename/RnEnv.lhs +++ b/ghc/compiler/rename/RnEnv.lhs @@ -258,6 +258,9 @@ lookupInstDeclBndr cls_name rdr_name | otherwise = getGlobalAvails `thenRn` \ avail_env -> case lookupNameEnv avail_env cls_name of + -- class not in scope; don't fail as later checks will catch this, + -- but just return (bogus) name. Icky. + Nothing -> returnRn (mkUnboundName rdr_name) Just (AvailTC _ ns) -> case [n | n <- ns, nameOccName n == occ] of (n:ns)-> ASSERT( null ns ) returnRn n [] -> failWithRn (mkUnboundName rdr_name) |