How can I tell Emacs that the function foo is a function and defined in the dynamic module foo.c, not the elisp file which loaded it, baz.el?
Emacs 27 now knows this. Well, technically it knows that foo is a function defined in foo.so, but you can then translate this to foo.c pretty easily, e.g.:
(replace-regexp-in-string (rx (eval module-file-suffix) eos)
The use of (fn ARGS) syntax is described in (elisp) Function Documentation:
The last line of the documentation string can specify calling
conventions different from the actual function arguments. Write text
following a blank line, at the beginning of the line, with no newline
following it inside the documentation string. ...