Changeset 14639 for src/Pugs/Eval.hs

Show
Ignore:
Timestamp:
11/05/06 18:46:26 (2 years ago)
Author:
audreyt
svk:copy_cache_prev:
41990
Message:

* t/var/let.t: All tests passed, 0 TODOs.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Eval.hs

    r14637 r14639  
    364364        -- if the liftSTM is reached, exp evaluated without error; no need to shift out 
    365365        evalExp exp `finallyM` liftSTM (writeTVar isNonLocal False) 
     366    when (isFailure val) $ do 
     367        mapM_ (\tmp -> evalExp $ App (Val tmp) Nothing []) tmps 
    366368    isn <- liftSTM $ readTVar isNonLocal 
    367     if isn 
    368         then do 
    369             when (isFailure val) $ do 
    370                 mapM_ (\tmp -> evalExp $ App (Val tmp) Nothing []) tmps 
    371             retShift val 
    372         else return val 
    373     where 
    374     isFailure (VControl (ControlLeave{ leaveValue = v })) 
    375         | VUndef <- v = True 
    376         | VRef r <- v = refType r == mkType "Failure" 
    377         | otherwise   = False 
     369    if isn then retShift val else return val 
     370    where 
     371    isFailure (VControl ControlLeave{ leaveValue = v }) = isFailure v 
    378372    isFailure VControl{}    = True 
     373    isFailure VUndef        = True 
     374    isFailure VError{}      = True 
     375    isFailure (VRef r)      = refType r == mkType "Failure" 
    379376    isFailure _             = False 
    380  
    381  
    382377 
    383378reducePad _ lex exp = do