You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is part of the migration to v3. You can read full details about the various changes here.
In Exercism v3, students can now choose to work on exercises directly from their browser, instead of having to download exercises to their local machine. The track-specific settings for the in-browser editor are defined in the top-level "online_editor" field in the track's config.json file. This field is defined as an object with two fields:
"indent_style": the indent style, either "space" or "tab".
"indent_size": the indent size, which is an integer (e.g. 4).
You can find a full description of these fields in the spec.
Goal
The "online_editor" field should be updated to correspond to the track's best practices regarding indentation.
I don't know that there exists a correct value for this. In part because there is not one fixed best indentation practice in Haskell, and in part because indentation in Haskell is not always done with one fixed set of indentation columns. See for example Kowainik's style guide that recommends a mixture of 2 and 4 spaces, or dmwit's "I mix tabs and spaces.", or observe that there are multiple code formatters (Ormolu, Brittany, Hindent) that do not agree either.
Assuming that we cannot find a correct value, and we have to pick one, perhaps we can find a value with some other property, such as popularity (e.g. 4 spaces) or ability to work in most situations where you'd normally have different values (e.g. 2 spaces).
It is a consequence of merging exercism/v3#51, where I picked 2 spaces because it appeared, to me, to be the option that most easily aligns with the many indentation styles that people have. So while 4 spaces is the more popular choice in general, 2 spaces allows for both "always indent by 2 spaces" and "sometimes indent by 2 spaces, sometimes by 4 spaces", e.g. as in:
foo::T
foo =
bar
where
bar =...
I will close this issue, and we can refer back to it in the event that someone should find a better way to justify having any one default.
This issue is part of the migration to v3. You can read full details about the various changes here.
In Exercism v3, students can now choose to work on exercises directly from their browser, instead of having to download exercises to their local machine. The track-specific settings for the in-browser editor are defined in the top-level
"online_editor"
field in the track'sconfig.json
file. This field is defined as an object with two fields:"indent_style"
: the indent style, either "space" or "tab"."indent_size"
: the indent size, which is an integer (e.g. 4).You can find a full description of these fields in the spec.
Goal
The
"online_editor"
field should be updated to correspond to the track's best practices regarding indentation.Example
Tracking
exercism/v3-launch#2
The text was updated successfully, but these errors were encountered: