dotnet / dotnet/fsharp

Indentation rules should be made clearer in list comprehsions

Open
#4,234 8 comments 1 reaction 0 assignees View on GitHub
Area-Diagnostics Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

For elmish newcomers it's sometimes hard to understand the indentation rules. And compiler error messages are not helpful:

let div _ _ = 1

let subView _ _ = [1; 2]

let view1 model dispatch =
[
div [] [
subView model dispatch
]
]

let view2 model dispatch =
[
div []
[
subView model dispatch
]
]

let view3 model dispatch =
[
div []
[
subView model dispatch
]
]

view1 and view3 are ok. view2 gives:

![image](https://user-images.githubusercontent.com/57396/35192899-b0434f3a-fe9a-11e7-9863-fef7d0c00331.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.