Changeset 4270 for src/Pugs/Prim/Code.hs

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).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Code.hs

    r4151 r4270  
    11{-# OPTIONS_GHC -fglasgow-exts #-} 
    2 module Pugs.Prim.Code ( 
    3     -- for Pugs.Prim 
    4     op1CodeAssoc, 
    5     op1CodeName, 
    6     op1CodeArity, 
    7 ) where 
     2module Pugs.Prim.Code where 
    83import Pugs.AST 
    94import Pugs.Internals 
     
    2318    code <- fromVal v 
    2419    return . castV . length $ subParams code 
     20 
     21op1CodeBody :: Val -> Eval Val 
     22op1CodeBody v = do 
     23    code <- fromVal v 
     24    expToEvalVal $ subBody code