-
-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add type annotation to main
in projects generated by gleam new
#4313
Comments
main
in project generated by gleam new
main
in projects generated by gleam new
I like that this will encourage people to annotate their functions, and maybe it'll persuade people not to try and return a result from their main function. It might be a slight annoyance if you do want to change the return type, but I'm not sure why you would want to return some other type. I'm in favour of this, but I'm open to any other suggestions! |
I've created a PR that resolves this issue. Once everyone agrees it is a reasonable approach, we can merge it. |
Currently, the
gleam new
command generates a project with amain
function without a type annotation. It is idiomatic in gleam to include type annotations, and therefore I'd suggest we add an annotation tomain
of the type-> Nil
.The text was updated successfully, but these errors were encountered: