49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
if( !success )
return nullopt;
return TERM( v );
}
Value BuildTFunc( const Context& c, const TFuncType& tft, const Term& identity, const Value& params, ptr< void > body )
{
auto sig = BuildTFuncSignature( c, tft );
if( !sig )
return PoisonValue();
return ToValue( TFunc( tft, *sig, identity, body ) );
}
optional< Term > BuildArgPatternFromTFuncType( const Context& c, const Value& tfuncType )
{
const auto& ftype = FromValue< TFuncType >( tfuncType );
assert( ftype );
|
|
>
|
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
if( !success )
return nullopt;
return TERM( v );
}
Value BuildTFunc( const Context& c, const TFuncType& tft,
const Term& parentIdentity, const Term& identity, const Value& params, ptr< void > body )
{
auto sig = BuildTFuncSignature( c, tft );
if( !sig )
return PoisonValue();
return ToValue( TFunc( tft, *sig, parentIdentity, identity, body ) );
}
optional< Term > BuildArgPatternFromTFuncType( const Context& c, const Value& tfuncType )
{
const auto& ftype = FromValue< TFuncType >( tfuncType );
assert( ftype );
|