-
Notifications
You must be signed in to change notification settings - Fork 51
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
Purescript style guide #56
Comments
|
Hmmm, I don't understand that one either. I think some of the guidelines won't work with |
Since we have an autoformatter now, can we just use it as an oracle instead of writing a guide? |
I think there's more to style guide than formatting. We should probably have one that is based on Haskell one where possible. |
Some PS-specific questions to address:
|
@klntsky Should not it be closed, as the matter is settled? |
@uhbif19 the list in the original post is about things not eforced by the formatter |
How about:
I think the first is preferable for purescript since the compose function is more characters. |
@rynoV I agree, also, compose uses more stack. |
Suggestion:
I haven't checked this, but based on the definition that would be used for the latter, I think recursively resolving the instances would be less efficient. |
We have a Haskell style guide which we can partially follow, but we should probably have one for Purescript code as well (and maybe even for FFI code)
Let's use this issue as a list of conventions we try to follow
$
required beforedo
, unlike in Haskell$
with parentheses where it's possible to use only$
sf1 $ f2 $ f3 v
overf1 <<< f2 <<< f3 $ v
and(f1 <<< f2 <<< f3) v
(compose uses more stack and has longer operator name)import Foo.Bar (baz) as X
, notimport Foo.Bar (baz) as Foo.Bar
(avoids boilerplate and clearly indicates the purpose of the import)Contract.*
modules. The motivation is it would makeimport
s management more complicated for the users (the need to choose between modules).language-server
users will have a better UX (there is no need to choose a module if only one module exports an identifier)test/
insrc/
(the reason is: spago only looks up for modules fromsrc/
in dependencies of a project, so that would make CTL unusable as dependency).The text was updated successfully, but these errors were encountered: