Changeset 4270 for src/Pugs/Types

Show
Ignore:
Timestamp:
06/01/05 17:46:40 (4 years ago)
Author:
theorbtwo
svk:copy_cache_prev:
5861
Message:

Hackish Code.body support (presently useless as well, as there aren't any
methods on Code::Exp, but that should change soon).

Location:
src/Pugs/Types
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Types/Array.hs

    r4229 r4270  
    247247    array_fetchVal pv 1    = return . snd =<< readIVar pv 
    248248    array_fetchVal _  _    = return undef 
    249     array_storeVal _ _ _   = retConstError undef 
    250     array_storeElem _ _ _  = retConstError undef 
    251     array_deleteElem _ _   = retConstError undef 
     249    array_storeVal a _ _   = retConstError $ VStr $ show a 
     250    array_storeElem a _ _  = retConstError $ VStr $ show a 
     251    array_deleteElem a _   = retConstError $ VStr $ show a 
    252252 
    253253evalPerl5Sub :: String -> [PerlSV] -> Eval Val 
  • src/Pugs/Types/Code.hs

    r3506 r4270  
    11 
    22class (Typeable a) => CodeClass a where 
    3     code_iType :: a -> Type 
     3    code_iType    :: a -> Type 
    44    code_iType = const $ mkType "Code" 
    55    code_fetch    :: a -> Eval VCode 
     
    3030        _           -> mkType "Sub" 
    3131    code_fetch    = return 
    32     code_store _ _= retConstError undef 
     32    code_store c _= retConstError $ VStr $ show c 
    3333    code_assuming c [] [] = return c 
    3434    code_assuming _ _ _   = error "assuming"