Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Ctx = Ctx {}
- data Env = 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] -> F ExtOp Value
- data ExtOp a
- = ExtOpTrace SrcLoc String a
- | ExtOpBreak [SrcLoc] Ctx Env a
- | ExtOpError InterpreterError
- typeEnv :: Env -> Env
- data Value
- = ValuePrim !PrimValue
- | ValueArray !(Array Int Value)
- | ValueRecord (Map Name Value)
- mkArray :: [Value] -> Maybe Value
- fromTuple :: Value -> Maybe [Value]
- isEmptyArray :: Value -> Bool
Documentation
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] -> F ExtOp Value Source #
Execute the named function on the given arguments; will fail horribly if these are ill-typed.
A fully evaluated Futhark value.
mkArray :: [Value] -> Maybe Value Source #
Create an array value; failing if that would result in an irregular array.
isEmptyArray :: Value -> Bool Source #