I can't use the decorator @function inside of a class while using self or cls as the parameter of the function decorated. The following example gives an error.
import egglog as el
# @dataclass
class Num(el.Expr):
def __init__(self, value: el.i64Like) -> None:
...
# This works
@classmethod
def var(cls, name: el.StringLike) -> Num:
...
# this does not work
@function (cost=10)
def __add__(cls, other: Num) -> Num:
...
# this does not work
@function (cost=10)
def __add__(self, other: Num) -> Num:
...
Is this considered an issue? If no, is there another way to set costs and other attributes for functions without using the function decorator?