Goose  Artifact [a0410b78ba]

Artifact a0410b78ba0853ef4f5fb8d8dcb77f009197cd2b9076c205893752a5782b69ad:

  • File bs/builtins/types/template/build.h — part of check-in [51f288ba2a] at 2021-09-13 21:52:06 on branch trunk —
    • Implemented a generic wrapper for the simple native types that can be embedded in Terms
    • Added more specific overloads for the assignment operator that should work only on builtin types, so that library and user defined types will be able to choose whether they're copyable
    • The EIR representation for all builtin runtime types are now prefixed with "rt_type" to more easily write generic matching rules against them
    • EIR: Fixed long standing bugs in Enumerate and Decompose that surfaced because of the above
    • Miscellaneous code cleaning
    (user: achavasse size: 629)

#ifndef GOOSE_BUILTINS_TEMPLATE_BUILD_H
#define GOOSE_BUILTINS_TEMPLATE_BUILD_H

namespace goose::builtins
{
    extern optional< TDecl > BuildTDecl( const Context& c, const Term& typeTExpr, StringId name );
    extern TFuncType BuildTFuncType( const Value& returnType, const Value& params );
    extern optional< Term > BuildTFuncSignature( const Context& c, const TFuncType& tft );
    extern Value BuildTFunc( const Context& c, const TFuncType& tft, const Term& identity, const Value& params, ptr< void > body );

    extern optional< Term > BuildArgPatternFromTFuncType( const Context& c, const Value& tfuncType );
}

#endif