X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FcodeGen%2FClosureInfo.lhs;h=27aed3a70e8163bf084e015a042e9e716f681c19;hp=e6319898db041ba7662eba5eb9967c7964636fab;hb=c098722488ee64a5288a9f20352310cfd08ae86b;hpb=06435c511c76ba7d084af3c9420614e167f4a9e5 diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs index e631989..27aed3a 100644 --- a/compiler/codeGen/ClosureInfo.lhs +++ b/compiler/codeGen/ClosureInfo.lhs @@ -594,7 +594,13 @@ getCallMethod this_pkg name (LFThunk _ _ updatable std_form_info is_fun) n_args if we enter the same thunk multiple times, so the optimisation of jumping directly to the entry code is still valid. --SDM -} - = ASSERT2( n_args == 0, ppr name ) EnterIt + = EnterIt + -- We used to have ASSERT( n_args == 0 ), but actually it is + -- possible for the optimiser to generate + -- let bot :: Int = error Int "urk" + -- in (bot `cast` unsafeCoerce Int (Int -> Int)) 3 + -- This happens as a result of the case-of-error transformation + -- So the right thing to do is just to enter the thing | otherwise -- Jump direct to code for single-entry thunks = ASSERT( n_args == 0 )