func foo(x: Int64):
""" Some amazing notes here! """
return x + 1
end
However, there is currently no way to retrieve it. The proposed solution is a sema_function called help(). Given an identifier, the resolved item's type and docstring are returned. This may necessitate adding an attribute to HIR's resolved so that every kind of identifier can participate.
Functions can accept a docstring:
However, there is currently no way to retrieve it. The proposed solution is a sema_function called
help()
. Given an identifier, the resolved item's type and docstring are returned. This may necessitate adding an attribute to HIR'sresolved
so that every kind of identifier can participate.Bonus is to add syntactic sugar to the REPL:
resolves to