diff options
author | simonpj@microsoft.com <unknown> | 2010-09-23 10:58:20 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-09-23 10:58:20 +0000 |
commit | 528db2ad98caf5067ebdadf424c6c816c3927dd4 (patch) | |
tree | feff35d159bd6c058c72d85a860e418057434df3 | |
parent | 8ddee6152c215e8e8ee1cbfff3481ea5bc062305 (diff) | |
download | haskell-528db2ad98caf5067ebdadf424c6c816c3927dd4.tar.gz |
Avoid ASSERT black hole
When this ASSERT tripped in CoreToStg it tried to print out
too much, which tripped the asssertion again. Result: an
infinite loop with no output at all. Hard to debug!
-rw-r--r-- | compiler/stgSyn/CoreToStg.lhs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs index 3b004c1ef3..9ddac59d4a 100644 --- a/compiler/stgSyn/CoreToStg.lhs +++ b/compiler/stgSyn/CoreToStg.lhs @@ -184,7 +184,11 @@ coreTopBindToStg this_pkg env body_fvs (NonRec id rhs) bind = StgNonRec id stg_rhs in - ASSERT2(consistentCafInfo id bind, ppr id {- $$ ppr rhs $$ ppr bind -} ) + ASSERT2(consistentCafInfo id bind, ppr id ) + -- NB: previously the assertion printed 'rhs' and 'bind' + -- as well as 'id', but that led to a black hole + -- where printing the assertion error tripped the + -- assertion again! (env', fvs' `unionFVInfo` body_fvs, bind) coreTopBindToStg this_pkg env body_fvs (Rec pairs) |