You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some other languages (like go and Rust) have a tool which you can use to automatically format source code according to style guidelines.
In addition to formatting code, it would also be useful if the tool could infer Koka types and insert type annotations into the code.
As an example, let's say you had this Koka code:
fun foo(a) {
a + 5
}
After running the format tool, it would replace the code with this:
fun foo(a: int): int {
a + 5
}
If the inferred type is ambiguous, the tool can ask the programmer to choose from a list of possible types.
This gives the convenience of type inference (not needing to write out the types), but also gives the benefits of explicit type signatures (more robust, better documentation, faster compiling, and easier to read)
The text was updated successfully, but these errors were encountered:
This seems like a good proposal for the language server at #100 :)
Koka now has a --showtypesigs option that prints all top-level type signatures into the console
Some other languages (like go and Rust) have a tool which you can use to automatically format source code according to style guidelines.
In addition to formatting code, it would also be useful if the tool could infer Koka types and insert type annotations into the code.
As an example, let's say you had this Koka code:
After running the format tool, it would replace the code with this:
If the inferred type is ambiguous, the tool can ask the programmer to choose from a list of possible types.
This gives the convenience of type inference (not needing to write out the types), but also gives the benefits of explicit type signatures (more robust, better documentation, faster compiling, and easier to read)
The text was updated successfully, but these errors were encountered: