Changeset 3739

Show
Ignore:
Timestamp:
05/23/05 16:56:50 (4 years ago)
Author:
iblech
svk:copy_cache_prev:
5329
Message:

Tentative implementation of nothingmuch's lazy proposal.

Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim.hs

    r3704 r3739  
    247247    val <- resetT $ evalExp (App (Val $ VCode sub) [] []) 
    248248    retEvalResult False val 
     249-- Tentative implementation of nothingsmuch's lazy proposal. 
     250op1 "lazy" = \v -> do 
     251    sub <- fromVal v 
     252    return $ VRef . thunkRef . MkThunk . evalExp $ App (Val $ VCode sub) [] [] 
    249253op1 "defined" = op1Cast (VBool . defined) 
    250254op1 "last" = const $ fail "cannot last() outside a loop" 
     
    12021206\\n   Str       pre     perl    (rw!Any|Junction)\ 
    12031207\\n   Any       pre     try     (Code)\ 
     1208\\n   Any       pre     lazy    (Code)\ 
    12041209\\n   Any       pre     eval    (Str)\ 
    12051210\\n   Any       pre     eval_parrot   (Str)\