Goose  Diff

Differences From Artifact [e2f16d7246]:

  • File bs/eir/match.h — part of check-in [a4f1ada98c] at 2021-09-15 21:24:51 on branch trunk —
    • VecOfLength() will now match vectors of compatible length, taking repetition terms into account
    • Vector unification and typechecking rules now handle vectors of variable lengths
    (user: achavasse size: 3562)

To Artifact [e69064befc]:

  • File bs/eir/match.h — part of check-in [dbf5bbf612] at 2021-09-21 18:48:03 on branch trunk — eir: remove the function to match a single eir against another eir, which was never actually used (user: achavasse size: 3470) [more...]

98
99
100
101
102
103
104
105
106
107
108
109
110
111
            void setupVars();

            ptr< unordered_map< StringId, any > > m_pVars;
            uint32_t m_complexity = 0;    // Each matched structural element of the pattern (vector) adds 1,
                                          // each matched literal element of the pattern adds 2
    };

    extern optional< MatchSolution > Match( const Term& expression, const Term& pattern );

    template< typename U >
    static Generator< pair< MatchSolution, const U& > > Match( const Term& expression, const Trie< U >& patterns );
}

#endif







<
<





98
99
100
101
102
103
104


105
106
107
108
109
            void setupVars();

            ptr< unordered_map< StringId, any > > m_pVars;
            uint32_t m_complexity = 0;    // Each matched structural element of the pattern (vector) adds 1,
                                          // each matched literal element of the pattern adds 2
    };



    template< typename U >
    static Generator< pair< MatchSolution, const U& > > Match( const Term& expression, const Trie< U >& patterns );
}

#endif