From 802feb46daec45f417a995cf72c045b1c5696654 Mon Sep 17 00:00:00 2001 From: sof <unknown> Date: Wed, 11 Mar 1998 16:49:01 +0000 Subject: [PATCH] [project @ 1998-03-11 16:49:01 by sof] newtype fix --- ghc/compiler/simplCore/SimplCase.lhs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc/compiler/simplCore/SimplCase.lhs b/ghc/compiler/simplCore/SimplCase.lhs index 007221cbd7b7..6417701517d2 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) -- GitLab