#ifndef EMPATHY_BUILTINS_TYPES_BFUNC_H
#define EMPATHY_BUILTINS_TYPES_BFUNC_H
namespace empathy::builtins
{
using BuiltinFuncWrapper = function< optional< Value >( const Term& argVec ) >;
template< typename F >
void RegisterBuiltinFunc( Env& env, const StringId& name, F&& func );
bool IsBuiltinFunc( const Value& func );
const BuiltinFuncWrapper& GetBuiltinFuncWrapper( const Value& func );
}
namespace empathy::ir
{
template< typename R, typename... T >
struct Bridge< R ( T... )>
{
using functype = function< R ( T... ) >;
static const Term& Type();
template< typename F >
static Value ToValue( F&& func );
template< typename F >
static auto WrapFunc( F&& func );
};
}
#endif