futhark
Safe HaskellNone
LanguageGHC2021

Futhark.Test.Compile

Description

Compiling Futhark programs and running them as servers, as needed for testing and benchmarking, but also by anything else that runs compiled programs.

Synopsis

Documentation

newtype FutharkExe Source #

The futhark executable we are using. This is merely a wrapper around the underlying file path, because we will be using a lot of different file paths here, and it is easy to mix them up.

Constructors

FutharkExe FilePath 

binaryName :: FilePath -> FilePath Source #

The name we use for compiled programs.

compileProgram :: (MonadIO m, MonadError Text m) => [String] -> FutharkExe -> String -> FilePath -> m (ByteString, ByteString) Source #

compileProgram extra_options futhark backend program compiles program with the command futhark backend extra-options..., and returns stdout and stderr of the compiler. Throws an IO exception containing stderr if compilation fails.

futharkServerCfg :: FilePath -> [String] -> ServerCfg Source #

Create a Futhark server configuration suitable for use when testing/benchmarking Futhark programs.