futhark-0.18.3: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Compiler.Program

Description

Low-level compilation parts. Look at Futhark.Compiler for a more high-level API.

Synopsis

Documentation

readLibraryWithBasis :: (MonadError CompilerError m, MonadIO m) => Basis -> [FilePath] -> m (Warnings, Imports, VNameSource) Source #

Read Futhark files from some basis, and printing log messages if the first parameter is True.

readImports :: (MonadError CompilerError m, MonadIO m) => Basis -> [ImportName] -> m (Warnings, Imports, VNameSource) Source #

Read and type-check Futhark imports (no .fut extension; may refer to baked-in prelude). This is an exotic operation that probably only makes sense in an interactive environment.

type Imports = [(String, FileModule)] Source #

A mapping from import names to imports. The ordering is significant.

data FileModule Source #

The result of type checking some file. Can be passed to further invocations of the type checker.

Constructors

FileModule 

Fields

data Warnings Source #

The warnings produced by the compiler. The Show instance produces a human-readable description.

Instances

Instances details
Semigroup Warnings Source # 
Instance details

Defined in Language.Futhark.Warnings

Monoid Warnings Source # 
Instance details

Defined in Language.Futhark.Warnings

Pretty Warnings Source # 
Instance details

Defined in Language.Futhark.Warnings

Methods

ppr :: Warnings -> Doc #

pprPrec :: Int -> Warnings -> Doc #

pprList :: [Warnings] -> Doc #

data Basis Source #

Pre-typechecked imports, including a starting point for the name source.

Constructors

Basis 

Fields

emptyBasis :: Basis Source #

A basis that contains no imports, and has a properly initialised name source.