#include "builtins/builtins.h"

namespace goose::builtins
{
    bool IsIntrinsicFunc( const Value& func )
    {
        auto funcType = ValueFromIRExpr( func.type() );
        assert( funcType );

        auto decomp = Decompose( funcType->val(),
            Vec(
                Lit( "func"_sid ),
                Lit( "intrinsic"_sid ),
                SubTerm(),  // domain
                SubTerm(),  // return type
                SubTerm(),  // param types
                SubTerm()   // verif info
            )
        );

        return !!decomp;
    }
}
