Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Ctx = Ctx {}
- data Env
- data InterpreterError
- initialCtx :: Ctx
- interpretExp :: Ctx -> Exp -> F ExtOp Value
- interpretDec :: Ctx -> Dec -> F ExtOp Ctx
- interpretImport :: Ctx -> (FilePath, Prog) -> F ExtOp Ctx
- interpretFunction :: Ctx -> VName -> [Value] -> Either String (F ExtOp Value)
- data ExtOp a
- data StackFrame = StackFrame {
- stackFrameLoc :: Loc
- stackFrameCtx :: Ctx
- typeCheckerEnv :: Env -> Env
- data Value
- = ValuePrim !PrimValue
- | ValueArray ValueShape !(Array Int Value)
- | ValueRecord (Map Name Value)
- fromTuple :: Value -> Maybe [Value]
- isEmptyArray :: Value -> Bool
- prettyEmptyArray :: TypeBase () () -> Value -> String
Documentation
Instances
data InterpreterError Source #
Instances
Show InterpreterError Source # | |
Defined in Language.Futhark.Interpreter showsPrec :: Int -> InterpreterError -> ShowS # show :: InterpreterError -> String # showList :: [InterpreterError] -> ShowS # |
initialCtx :: Ctx Source #
The initial environment contains definitions of the various intrinsic functions.
interpretFunction :: Ctx -> VName -> [Value] -> Either String (F ExtOp Value) Source #
Execute the named function on the given arguments; may fail horribly if these are ill-typed.
data StackFrame Source #
Instances
Located StackFrame Source # | |
Defined in Language.Futhark.Interpreter locOf :: StackFrame -> Loc # locOfList :: [StackFrame] -> Loc # |
typeCheckerEnv :: Env -> Env Source #
A fully evaluated Futhark value.
ValuePrim !PrimValue | |
ValueArray ValueShape !(Array Int Value) | |
ValueRecord (Map Name Value) |
isEmptyArray :: Value -> Bool Source #
Does the value correspond to an empty array?