Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Low-level compilation parts. Look at Futhark.Compiler for a more high-level API.
Synopsis
- readLibrary :: (MonadError CompilerError m, MonadIO m) => [Name] -> [FilePath] -> m (Warnings, Imports, VNameSource)
- readUntypedLibrary :: (MonadIO m, MonadError CompilerError m) => [FilePath] -> m [(ImportName, UncheckedProg)]
- readImports :: (MonadError CompilerError m, MonadIO m) => Basis -> [ImportName] -> m (Warnings, Imports, VNameSource)
- type Imports = [(String, FileModule)]
- data FileModule = FileModule {}
- data Warnings
- data Basis = Basis {}
- emptyBasis :: Basis
Documentation
:: (MonadError CompilerError m, MonadIO m) | |
=> [Name] | Extra functions that should be marked as entry points; only applies to the immediate files, not any imports imported. |
-> [FilePath] | The files to read. |
-> m (Warnings, Imports, VNameSource) |
Read and type-check some Futhark files.
readUntypedLibrary :: (MonadIO m, MonadError CompilerError m) => [FilePath] -> m [(ImportName, UncheckedProg)] Source #
Read (and parse) all source files (including the builtin prelude) corresponding to a set of root files.
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.
The warnings produced by the compiler. The Show
instance
produces a human-readable description.
Pre-typechecked imports, including a starting point for the name source.
Basis | |
|
emptyBasis :: Basis Source #
A basis that contains no imports, and has a properly initialised name source.