futhark-0.11.2: An optimising compiler for a functional, array-oriented language.

Safe HaskellNone
LanguageHaskell2010

Language.Futhark.Interpreter

Synopsis

Documentation

data Ctx Source #

Constructors

Ctx 

data Env Source #

Constructors

Env 

Fields

Instances
Semigroup Env Source # 
Instance details

Defined in Language.Futhark.Interpreter

Methods

(<>) :: Env -> Env -> Env #

sconcat :: NonEmpty Env -> Env #

stimes :: Integral b => b -> Env -> Env #

Monoid Env Source # 
Instance details

Defined in Language.Futhark.Interpreter

Methods

mempty :: Env #

mappend :: Env -> Env -> Env #

mconcat :: [Env] -> Env #

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.

data ExtOp a Source #

Instances
Functor ExtOp Source # 
Instance details

Defined in Language.Futhark.Interpreter

Methods

fmap :: (a -> b) -> ExtOp a -> ExtOp b #

(<$) :: a -> ExtOp b -> ExtOp a #

data Value Source #

A fully evaluated Futhark value.

Instances
Eq Value Source # 
Instance details

Defined in Language.Futhark.Interpreter

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

Pretty Value Source # 
Instance details

Defined in Language.Futhark.Interpreter

Methods

ppr :: Value -> Doc #

pprPrec :: Int -> Value -> Doc #

pprList :: [Value] -> Doc #

mkArray :: [Value] -> Maybe Value Source #

Create an array value; failing if that would result in an irregular array.