Skip to content
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

Conformace with style guide #14

Closed
ivanperez-keera opened this issue Apr 6, 2023 · 0 comments
Closed

Conformace with style guide #14

ivanperez-keera opened this issue Apr 6, 2023 · 0 comments
Assignees
Milestone

Comments

@ivanperez-keera
Copy link
Owner

The main implementation file is not conformant with our style guide. For example, by visual inspection, we can see that the following text is misaligned:

https://github.com/ivanperez-keera/yampa-gloss/blob/develop/src/Graphics/Gloss/Interface/FRP/Yampa.hs#L43-L46

We should make sure that this file conforms to the same style guide as Yampa.

@ivanperez-keera ivanperez-keera added this to the 0.3 milestone Apr 6, 2023
@ivanperez-keera ivanperez-keera self-assigned this Apr 6, 2023
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
All Haskell files must include a copyright notice in a comment. The
copyright notice must be included in a format parseable by Haddock.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Imports should be grouped between external imports, external imports
from the same project (but different libraries) and internal imports.
When groups are used, comments must be used to indicate the nature of
each group. If there are no distinct groups, they are considered to be
all in the same group.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Imports should not be redundant (aka. no unused imports).
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Where there is an explicit export list, the file should follow the same
structure and order as the export list.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
All top-level definitions should include haddock documentation.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Each argument function or record field should be documented separately.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Each time a new expression or block-like construct is opened, the indent
should increase by two spaces. When the section ends, the indent returns
to the previous indent level. The indent level applies to both Haskell
expressions and comments throughout the block.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
.

We set the code limit for Haskell files at 80 characters.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Do not leave any spaces at the end of any line.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Do not leave any extra spaces except as mandated or recommended by these
rules.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Do not wrap expressions in parenthesis unnecessarily.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
When allowed, prefer where to let clauses (except as needed in do blocks
and arrow blocks).
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
.

Prefer longer, more descriptive names to short, abstract ones. For
example, a function that takes a length as argument should not call the
variable l and, instead, call it len or a longer name.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
Type expressions in where and let clauses, even when the type checker
can infer the types.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
#14.

Avoid any compilation warnings. Where the warning is acceptable,
document it with a comment and, optionally, with an indicator that makes
the compiler not trigger the warning.

This commit moves a definition whose name clases with another to the
scope of the only function that uses it, where such a name clash does
not occur.
ivanperez-keera added a commit that referenced this issue Apr 6, 2023
#14.

Avoid any compilation warnings. Where the warning is acceptable,
document it with a comment and, optionally, with an indicator that makes
the compiler not trigger the warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant