Changeset 14636 for src/Pugs/Prim.hs

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

* Pugs.Prim: "fail" should throw out a Failure thunk.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim.hs

    r14599 r14636  
    393393    pos   <- asks envPos 
    394394    let die = retShift $ VError (errmsg v) [pos] 
    395     retShift . VRef . thunkRef $ MkThunk die anyType 
     395        dieThunk = VRef . thunkRef $ MkThunk die (mkType "Failure") 
     396    op1Return (retControl (ControlLeave (<= SubRoutine) 0 dieThunk)) 
    396397    where 
    397398    errmsg VUndef      = VStr "Failed"