Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Evaluation of foreign functions.
Synopsis
- findForeignDecls :: ModuleG mname -> [(Name, FFIFunType)]
- evalForeignDecls :: ForeignSrc -> [(Name, FFIFunType)] -> EvalEnv -> Eval (Either [FFILoadError] EvalEnv)
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 (Either [FFILoadError] EvalEnv) Source #
Add the given foreign declarations to the environment, loading their
implementations from the given ForeignSrc
. This is a separate pass from the
main evaluation functions in Cryptol.Eval since it only works for the
Concrete backend.