-
-
Notifications
You must be signed in to change notification settings - Fork 2
Labels
enhancementNew feature or requestNew feature or requestnix targetRelated to the nix target's codegenRelated to the nix target's codegen
Milestone
Description
Since Nix 2.2412, one may write :doc some-function
on the Nix REPL (invoked by nix repl
) to obtain a function's documentation, specified through a docstring in the format specified by Nix RFC 1453, as follows:
let
/** Function doc */
func = x: y: x + y;
in ...
Additionally, in Gleam, we may specify documentation comments on functions through the ///
syntax, as follows:
/// Function doc
pub fn func(x: Int, y: Int) -> Int {
x + y
}
When generating the Nix code for this function, it could be nice to translate the Gleam docstring into a Nix docstring so it can be accessed through :doc
.
One concern: We'd need to escape */
in the docstring somehow. One way could be to add a whitespace between *
and /
, but this could be a problem depending on the contents of the docstring.
Footnotes
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestnix targetRelated to the nix target's codegenRelated to the nix target's codegen