From: simonpj Date: Fri, 11 Mar 2005 10:36:35 +0000 (+0000) Subject: [project @ 2005-03-11 10:36:35 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~919 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=75649bccc12b26d31a055acb510badfd03621a98;p=ghc-hetmet.git [project @ 2005-03-11 10:36:35 by simonpj] ---------------------------------- Fix a "class used as a type" crash ---------------------------------- Merge to STABLE Thanks to Shae for finding this one. tcfail134 tests. --- diff --git a/ghc/compiler/typecheck/TcHsType.lhs b/ghc/compiler/typecheck/TcHsType.lhs index 2841332..8155820 100644 --- a/ghc/compiler/typecheck/TcHsType.lhs +++ b/ghc/compiler/typecheck/TcHsType.lhs @@ -418,7 +418,9 @@ The type desugarer * Zonks any kinds It cannot fail, and does no validity checking, except for -structural matters, such as spurious ! annotations. +structural matters, such as + (a) spurious ! annotations. + (b) a class used as a type \begin{code} dsHsType :: LHsType Name -> TcM Type @@ -499,9 +501,9 @@ ds_var_app :: Name -> [Type] -> TcM Type ds_var_app name arg_tys = tcLookup name `thenM` \ thing -> case thing of - ATyVar _ ty -> returnM (mkAppTys ty arg_tys) - AGlobal (ATyCon tc) -> returnM (mkGenTyConApp tc arg_tys) - other -> pprPanic "ds_app_type" (ppr name <+> ppr arg_tys) + ATyVar _ ty -> returnM (mkAppTys ty arg_tys) + AGlobal (ATyCon tc) -> returnM (mkGenTyConApp tc arg_tys) + other -> wrongThingErr "type" thing name \end{code}