purescript-style-guide
purescript-style-guide copied to clipboard
A style guide for the PureScript programming language.
Just had a discussion with a coworker about what to do with imports once they exceed 80 characters. Would something like ``` import Some.Long.Module (Thing, That, Blah, asdasd, asdasdasdasd, adasdasdasdas,...
I think this should be emphasised particularly for library code. For application code I might note it's reasonable to clearly identify certain warning class to ignore - e.g. an error...
If you're going to do this to prevent excessively long lines, do it like this: ``` purescript logShow :: forall a eff . Show a => a -> Eff (console...
This is the general principle with several of the other cases, but basically: don't indent based on the naming of things, so in functions do this kind of thing: ```...