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:

Did you mean to add an incorrect indent in view 2 as per the screenshot? in the code sample it looks ok
No, view2 doesn't compile. Try it
Ok. I just meant the screenshot you attached shows code that's different from the code snippet
Yes that closing bracket was indented one char to the left - which is fully
ok.
Am 21.01.2018 14:01 schrieb "Isaac Abraham" notifications@github.com:
Ok. I just meant the screenshot you attached shows code that's different
from the code snippet—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/visualfsharp/issues/4234#issuecomment-359246780,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNO69-RbDihiUyINLYjI2Rj130Laeks5tMzUigaJpZM4Rlwul
.
How do you propose improving this? To me, the indenting in view2 indicates the list is at the same level as div, not under div, as it should be. So the compiler error seems correct.
The compiler error is correct, but it’s not easy to trace back to the root of the issue, which is failing to indent the list passed as a parameter to the div function.
As with all of these errors, they're always correct, but unfortunately next to useless to actually guide the developer to the solution ;)
see #4255
Most helpful comment
As with all of these errors, they're always correct, but unfortunately next to useless to actually guide the developer to the solution ;)