From: simonpj Date: Fri, 25 Feb 2005 13:54:41 +0000 (+0000) Subject: [project @ 2005-02-25 13:54:41 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1019 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=a42ead96edd42c362778e7420e45e911b379abd6 [project @ 2005-02-25 13:54:41 by simonpj] Prevent a crash; reason the situation arises in the first place is still unclear --- diff --git a/ghc/compiler/typecheck/TcSimplify.lhs b/ghc/compiler/typecheck/TcSimplify.lhs index dd4d215..5db9c0a 100644 --- a/ghc/compiler/typecheck/TcSimplify.lhs +++ b/ghc/compiler/typecheck/TcSimplify.lhs @@ -2394,7 +2394,8 @@ addNoInstanceErrs mb_what givens dicts -- Insts for which it is worth suggesting an adding an instance declaration -- Exclude implicit parameters, and tyvar dicts - add_ors :: [SDoc] -> [SDoc] + add_ors :: [SDoc] -> [SDoc] -- The empty case should not happen + add_ors [] = ptext SLIT("[No suggested fixes]") -- Strange add_ors (f1:fs) = f1 : map (ptext SLIT("or") <+>) fs addTopAmbigErrs dicts