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
ambitious-actor-36781
04/12/2023, 9:14 AMcurved-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 AMcurved-television-6568
04/12/2023, 9:22 AMambitious-actor-36781
04/12/2023, 9:23 AMambitious-actor-36781
04/12/2023, 9:24 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 AMcurved-television-6568
04/12/2023, 9:29 AMwitty-crayon-22786
04/12/2023, 4:42 PMwitty-crayon-22786
04/12/2023, 4:42 PMcurved-television-6568
04/12/2023, 5:01 PMwitty-crayon-22786
04/12/2023, 7:10 PMwitty-crayon-22786
04/12/2023, 7:19 PMwitty-crayon-22786
04/12/2023, 7:21 PMwitty-crayon-22786
04/13/2023, 4:32 PMwitty-crayon-22786
04/13/2023, 4:33 PMawait Call(my_rule_function, AnArgument(..))
witty-crayon-22786
04/13/2023, 4:33 PMwitty-crayon-22786
04/13/2023, 4:34 PM@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(..), ...)
witty-crayon-22786
04/13/2023, 4:39 PM>>> def callee(*args, **kwargs):
... print(args)
…
>>> callee("one", ...)
('one', Ellipsis)
witty-crayon-22786
04/13/2023, 4:41 PMcurved-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..
curved-television-6568
04/13/2023, 4:46 PM@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