Changeset 15670 for src/Pugs/Prim.hs

Show
Ignore:
Timestamp:
03/13/07 00:48:16 (21 months ago)
Author:
audreyt
Message:

* Pugs.Prim: atomicEval now ensures that errors and control

exceptions within the STM transaction gets propagates out
correctly. This makes "--1" fail as desired.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim.hs

    r15659 r15670  
    15781578atomicEval action = do 
    15791579    env <- ask 
    1580     if envAtomic env then action else guardSTM (runEvalSTM env action) 
     1580    if envAtomic env then action else do 
     1581        rv <- guardSTM (runEvalSTM env action) 
     1582        case rv of 
     1583            VError{}    -> retShift rv 
     1584            VControl{}  -> retShift rv 
     1585            _           -> return rv 
    15811586 
    15821587{-| Assert that a list of Vals is all defined. 
     
    21062111\\n   Bool      pre     kill    safe   (Thread)\ 
    21072112\\n   Int       pre     kill    unsafe (Int, List)\ 
    2108 \\n   Object    pre     Object::new     safe   (Object: Named)\ 
     2113\\n   Object    pre     Object::new     safe,export   (Object: Named)\ 
    21092114\\n   Object    pre     BUILDALL   safe   (Object)\ 
    21102115\\n   Object    pre     DESTROYALL safe   (Object)\