cryptol-3.1.0: Cryptol: The Language of Cryptography
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cryptol.Eval.FFI

Description

Evaluation of foreign functions.

Synopsis

Documentation

findForeignDecls :: ModuleG mname -> [(Name, FFIFunType)] Source #

Find all the foreign declarations in the module and return their names and FFIFunTypes.

evalForeignDecls :: ForeignSrc -> [(Name, FFIFunType)] -> EvalEnv -> Eval ([FFILoadError], EvalEnv) Source #

Add the given foreign declarations to the environment, loading their implementations from the given ForeignSrc. If some implementations fail to load then errors are reported for them but any successfully loaded implementations are still added to the environment.

This is a separate pass from the main evaluation functions in Cryptol.Eval since it only works for the Concrete backend.