This is needed in some downstream use cases of effectful. It should only take a few lines of code thanks to the is_dataclass, as_dict and replace helpers from dataclasses:
def evaluate(expr, intp):
...
if dataclasses.is_dataclass(expr) and not isinstance(expr, type):
return dataclasses.replace(expr, **evaluate(dataclasses.as_dict(expr), intp=intp))
else:
return expr
It's possible we may need to address #296 first.