# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com# SPDX-License-Identifier: MIT---# @todo #85:60min Simplify Rcopy rule. Right now this rule is quite verbose.# It captures a lot objects around its targets. It's done in order to have# scope for contextualization of π2 right here right away. So it's a hack.# The origin Rcopy rule looks like this# pattern: β¦ π΅1, π1 β¦ β
, π΅3 β§(π1 β¦ π1)# result: β¦ π΅1, π1 β¦ π2, π΅3 β§# where π2 is an expression contextualized with π1 and some scope S.# But with such pattern we don't have this scope, we don't see it.# It should be calculated somehow. In general this scope is nearest# outer formation. So we need to create a way to calculate it and# rewrite this rule.name: COPYpattern: β¦ π΅1, π1 β¦ β¦ π΅2, π2 β¦ β
, π΅3 β§(π2 β¦ π1) * !t, π΅4 β§result: β¦ π΅1, π1 β¦ β¦ π΅2, π2 β¦ π2, π΅3 β§ * !t, π΅4 β§when: fn: π1where: - meta: π2 function: contextualize args: - π1 - β¦ π΅1, π1 β¦ β¦ π΅2, π2 β¦ β
, π΅3 β§(π2 β¦ π1) * !t, π΅4 β§