Changeset 15374 for src/Pugs/Eval

Show
Ignore:
Timestamp:
02/28/07 00:25:27 (21 months ago)
Author:
audreyt
Message:

* Adapt existing newVal implementation in Pugs.Val to MO.

A "Val" is now simply an invocant within the Eval monad.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Eval/Var.hs

    r15373 r15374  
    237237                -- callMethod methName [] 
    238238                -- inv ./ meth = ivDispatch inv $ MkMethodInvocation meth (mkArgs []) 
    239                 case invVV of 
    240                     Val.VPure p -> return . runIdentity $ do 
    241                         obj <- mkObj p 
    242                         res <- fromObjBox =<< obj ./ cast methName 
    243                         return . castV $ Val.VPure (res `asTypeOf` p) 
    244                     _       -> do 
    245                         return . castV $ "CCall " ++ show methName ++ " " ++ show capt 
     239                resVV <- invVV ./ cast methName 
     240                return . castV $ resVV 
    246241            } 
    247242