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

Clarify writing in 'Declarations' section #716

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions pages/docs/style-guide.elm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ the result will still look quite nice.
```elm
homeDirectory = "/root/files"

eval boolean = case boolean of
evaluate boolean = case boolean of
Literal bool -> bool
Not b -> not (eval b)
And b b_ -> eval b && eval b_
Expand All @@ -88,9 +88,10 @@ We saved vertical lines here, but at the cost of regularity and ease of
modification. If `Literal` ever becomes longer, all arrows must move. If any
branch gets too long, everything needs to come down a line anyway.

Having `case` appear *later* than the actual cases is strongly discouraged. It
should serve as a context clue that makes glancing through code easy, but when
indented in crazy ways, it becomes more difficult to glance through.
Having `case` appear further to the right than the actual cases is strongly
discouraged. It should serve as a context clue that makes glancing through code
easy, but when indented or positioned in crazy ways, it becomes more difficult
to glance through.


## Types
Expand Down