Pugs.Eval

|  | Contents | Index
Pugs.Eval
Synopsis
emptyEnv :: (MonadIO m, MonadSTM m) => String -> [STM (Pad -> Pad)] -> m Env
evaluateMain :: Exp -> Eval Val
evaluate :: Exp -> Eval Val
findSyms :: Var -> Eval [(String, Val)]
enterEvalContext :: Cxt -> Exp -> Eval Val
retVal :: Val -> Eval Val
trapVal :: Val -> Eval a -> Eval a
evalVar :: Ident -> Eval Val
findVar :: Ident -> Eval (Maybe VRef)
findVarRef :: Ident -> Eval (Maybe (TVar VRef))
getMagical :: String -> Eval (Maybe Val)
reduce :: Exp -> Eval Val
cxtOfExp :: Exp -> Eval Cxt
chainFun :: Params -> Exp -> Params -> Exp -> [Val] -> Eval Val
applyExp :: [ApplyArg] -> Exp -> Eval Val
apply :: VCode -> [Exp] -> [Exp] -> Eval Val
doApply :: Env -> VCode -> [Exp] -> [Exp] -> Eval Val
doFetch :: (Val -> Eval (IVar VScalar)) -> (Val -> Eval Val) -> (forall v . Value v => Eval v) -> Bool -> Bool -> Eval Val
mkFetch :: Value n => Eval (n -> Eval t) -> Val -> Eval t
Documentation
emptyEnv :: (MonadIO m, MonadSTM m) => String -> [STM (Pad -> Pad)] -> m Env
evaluateMain :: Exp -> Eval Val
evaluate
:: Exp | The expression to evaluate
-> Eval Val |
Evaluate an expression. This function mostly just delegates to `reduce`.
findSyms :: Var -> Eval [(String, Val)]
enterEvalContext :: Cxt -> Exp -> Eval Val
retVal :: Val -> Eval Val
trapVal :: Val -> Eval a -> Eval a
evalVar :: Ident -> Eval Val
findVar :: Ident -> Eval (Maybe VRef)
findVarRef :: Ident -> Eval (Maybe (TVar VRef))
getMagical
:: String | Name of the magical var to evaluate
-> Eval (Maybe Val) |
Evaluate the magical variable associated with a given name. Returns Nothing if the name does not match a known magical.
reduce
:: Exp | The expression to reduce
-> Eval Val |
Reduce an expression into its value.
cxtOfExp
:: Exp | Expression to find the context of
-> Eval Cxt |
Return the context that an expression bestows upon a hash or array subscript. See `reduce` for {} and []. (Is this correct?)
chainFun :: Params -> Exp -> Params -> Exp -> [Val] -> Eval Val
applyExp :: [ApplyArg] -> Exp -> Eval Val
apply :: VCode -> [Exp] -> [Exp] -> Eval Val
doApply :: Env -> VCode -> [Exp] -> [Exp] -> Eval Val
doFetch :: (Val -> Eval (IVar VScalar)) -> (Val -> Eval Val) -> (forall v . Value v => Eval v) -> Bool -> Bool -> Eval Val
mkFetch :: Value n => Eval (n -> Eval t) -> Val -> Eval t
Produced by Haddock version ADDOCK_VERSION