futhark
Safe HaskellNone
LanguageGHC2021

Language.Futhark.Interpreter.IO

Description

IO operations exposed through the interpreter.

Synopsis

Documentation

data IOOp Source #

The IO operation to perform. The idea of splitting it out into a type like this is to enforce some kind of auditing.

determineIO :: Monad m => Text -> Maybe (m ValueType -> Value m -> m IOOp) Source #

Determine which IO operation this is.

If you want to add a new one, then remember to also add it as an intrinsic in the type checker, and probably also to the prelude.

doIOOp :: forall (m :: Type -> Type). Maybe Server -> IOOp -> IO (Either Text (Value m)) Source #

Run an IO operation. Arrays are put on the server, if one is given.

ioRelativeTo :: FilePath -> IOOp -> IOOp Source #

Resolve relative file paths in the operation relative to the given directory, rather than the current working directory.