ambitious-actor-36781
04/12/2023, 3:24 AMAThing -> Digest
to look more like AThing -> Wrapper(Digest)
fixes the problem.curved-television-6568
04/12/2023, 9:01 AMDigest
for instance which may be used instead of the rule you intended.ambitious-actor-36781
04/12/2023, 9:09 AMrequest -> response
curved-television-6568
04/12/2023, 9:18 AMrequest -> foo -> bar -> baz -> response
or request -> some -> thing -> else -> response
.. 🤷 😉ambitious-actor-36781
04/12/2023, 9:19 AMcurved-television-6568
04/12/2023, 9:19 AMB
given A
and inspects every possible path through all known rules to satisfy thatambitious-actor-36781
04/12/2023, 9:20 AMcurved-television-6568
04/12/2023, 9:21 AMambitious-actor-36781
04/12/2023, 9:23 AMTarget -> IntermediateA
, IntermediateA -> IntermediateB
and IntermediateB -> Digest
I could just ask it Get(Digest, Target)
?curved-television-6568
04/12/2023, 9:25 AMambitious-actor-36781
04/12/2023, 9:26 AMcurved-television-6568
04/12/2023, 9:26 AMwitty-crayon-22786
04/12/2023, 4:42 PMcurved-television-6568
04/12/2023, 5:01 PMwitty-crayon-22786
04/12/2023, 7:10 PMawait Call(my_rule_function, AnArgument(..))
@rule
decorator transform calls into shims that would capture their arguments…curved-television-6568
04/13/2023, 4:36 PMwitty-crayon-22786
04/13/2023, 4:39 PMawait my_rule_function(AnArgument(..), ...)
>>> def callee(*args, **kwargs):
... print(args)
…
>>> callee("one", ...)
('one', Ellipsis)
curved-television-6568
04/13/2023, 4:45 PMCopy codeawait my_rule_function(AnArgument(..), ...)
this doesn’t look like magic to me, but I might have not used await if the rule wasn’t declared async..
@rule
decorator and only rules with a specified id may be called this way?witty-crayon-22786
04/13/2023, 4:52 PMcurved-television-6568
04/13/2023, 4:53 PMwitty-crayon-22786
05/03/2023, 11:46 PM