diff --git a/ghc/compiler/simplCore/SimplCase.lhs b/ghc/compiler/simplCore/SimplCase.lhs index 007221cbd7b7daa7b38a7fd0ec3b85540a6a1491..6417701517d223d29dfc7bb2f618a902985cb612 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)