#2833: internal error: throwTo: unrecognised why_blocked value
-------------------+--------------------------------------------------------
Reporter:  lilac   |          Owner:                  
    Type:  bug     |         Status:  new             
Priority:  normal  |      Component:  Runtime System  
 Version:  6.10.1  |       Severity:  normal          
Keywords:          |       Testcase:                  
      Os:  Linux   |   Architecture:  Unknown/Multiple
-------------------+--------------------------------------------------------
 The attached file, built with reactive 0.9.6 with the change listed below
 (fix for reactive bug#14), exhibits some strange behaviour. When built
 with -threaded and run without +RTS -N, everything is fine. When run with
 +RTS -N2, it slows down dramatically (using <10% CPU on each of my cores)
 and eventually crashes with:
 {{{
 Main: internal error: throwTo: unrecognised why_blocked value
     (GHC version 6.10.1 for x86_64_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 }}}

 The change to reactive (from http://hpaste.org/12528#a2) is to replace
 snapshotWith in FRP/Reactive/PrimRecursive.hs with:
 {{{
 snapshotWith :: forall a b c t. Ord t =>
                 (a -> b -> c) -> EventG t a -> ReactiveG t b -> EventG t c
 snapshotWith f es rs = listEG . zip (eats es) . zipWith f (evals es) $
 rats rs (eats es)

 evals :: EventG t a -> [a]
 evals (Event (Future (Max MaxBound, _))) = []
 evals (Event (Future (_, ~(v `Stepper` es)))) = v:evals es

 eats :: EventG t a -> [t]
 eats (Event (Future (Max MaxBound, ~(_ `Stepper` es)))) = []
 eats (Event (Future (Max (NoBound t), ~(_ `Stepper` es)))) = t:eats es
 eats (Event (Future (Max MinBound, ~(_ `Stepper` es)))) = eats es
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2833>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to