From: sof Date: Wed, 11 Mar 1998 16:49:01 +0000 (+0000) Subject: [project @ 1998-03-11 16:49:01 by sof] X-Git-Tag: Approx_2487_patches~872 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=802feb46daec45f417a995cf72c045b1c5696654;p=ghc-hetmet.git [project @ 1998-03-11 16:49:01 by sof] newtype fix --- diff --git a/ghc/compiler/simplCore/SimplCase.lhs b/ghc/compiler/simplCore/SimplCase.lhs index 007221c..6417701 100644 --- a/ghc/compiler/simplCore/SimplCase.lhs +++ b/ghc/compiler/simplCore/SimplCase.lhs @@ -508,10 +508,10 @@ simplAlts :: SimplEnv simplAlts env scrut (AlgAlts [] (BindDefault bndr@(id,occ_info) rhs)) rhs_c | maybeToBool maybe_data_ty && - not (null cons) && -- Not an abstract type (can arise if we're pruning tydecl imports) - null other_cons - = ASSERT( isDataTyCon tycon ) - newIds inst_con_arg_tys `thenSmpl` \ new_bindees -> + not (null cons) && -- Not an abstract type (can arise if we're pruning tydecl imports) + null other_cons && + isDataTyCon tycon -- doesn't apply to (constructor-less) newtypes + = newIds inst_con_arg_tys `thenSmpl` \ new_bindees -> let new_args = [ (b, bad_occ_info) | b <- new_bindees ] con_app = mkCon con ty_args (map VarArg new_bindees)