Skip to content
Snippets Groups Projects
Commit 802feb46 authored by sof's avatar sof
Browse files

[project @ 1998-03-11 16:49:01 by sof]

newtype fix
parent 578b75ca
No related merge requests found
...@@ -508,10 +508,10 @@ simplAlts :: SimplEnv ...@@ -508,10 +508,10 @@ simplAlts :: SimplEnv
simplAlts env scrut (AlgAlts [] (BindDefault bndr@(id,occ_info) rhs)) rhs_c simplAlts env scrut (AlgAlts [] (BindDefault bndr@(id,occ_info) rhs)) rhs_c
| maybeToBool maybe_data_ty && | maybeToBool maybe_data_ty &&
not (null cons) && -- Not an abstract type (can arise if we're pruning tydecl imports) not (null cons) && -- Not an abstract type (can arise if we're pruning tydecl imports)
null other_cons null other_cons &&
= ASSERT( isDataTyCon tycon ) isDataTyCon tycon -- doesn't apply to (constructor-less) newtypes
newIds inst_con_arg_tys `thenSmpl` \ new_bindees -> = newIds inst_con_arg_tys `thenSmpl` \ new_bindees ->
let let
new_args = [ (b, bad_occ_info) | b <- new_bindees ] new_args = [ (b, bad_occ_info) | b <- new_bindees ]
con_app = mkCon con ty_args (map VarArg new_bindees) con_app = mkCon con ty_args (map VarArg new_bindees)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment