Error formatting macro: pagetree: java.lang.NullPointerException
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

Problem

Typed Clojure uses local type argument synthesis to automatically synthesise type arguments to polymorphic functions. Some inference cases are hard to synthesise, which usually cause the inference engine to fail.

These cases require manual annotation of type arguments, which are potentially different at every function application.

Typed Clojure runs forms through the Clojure analyser, and parses the results of analysis.

I need a mechanism to communicate to Typed Clojure on a per-function-call basis.

Solution

Modify the analyser to preserve metadata attached to function calls.

Current Behaviour

Particular reader metadata keys are hardcoded to survive analysis, such as :tag.

Analysing this form loses any mention of :a, but keeps :tag in a special field in the result of analysis.

Proposal

 Modify the analyser to add a metadata field for function invocations.

Labels: