Comparing `effect/Match` and `ts-pattern` for AST Traversal and Interpretation

Hi, is it possible that effect/Match is less expressive than ts-pattern? Here's a classic AST-traversal and interpretation exercise, in which the recursive evalExpression succeeds only when implemented via ts-pattern.

With ts-pattern, the output is:
[eval]
$Boolean { value: true, _tag: 'Boolean' }


With effect/Match, I get:
/Users/jkomyno/.../node_modules/.pnpm/effect@3.8.4/node_modules/effect/src/internal/matcher.ts:547
    if (self._tag === "ValueMatcher") {
             ^


TypeError: Cannot read properties of undefined (reading '_tag')
    at self (/Users/jkomyno/.../node_modules/.pnpm/effect@3.8.4/node_modules/effect/src/internal/matcher.ts:547:14)
    at self (/Users/jkomyno/.../node_modules/.pnpm/effect@3.8.4/node_modules/effect/src/internal/matcher.ts:604:20)
    at evalExpression (/Users/jkomyno/.../src/interpreter.ts:98:11)


Is this an actual issue, or am I "hold it wrong"?
Was this page helpful?