-
Notifications
You must be signed in to change notification settings - Fork 3
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
What does hi2-ifte-offset exactly mean? #9
Comments
Thank you for your report! You are right, this variable doesn't seem to do anything. At first, I thought that it controls if/then/else indentation within do notation. That is, in code like this: main = do
if undefined
then undefined
else undefined You can see that here We have some plans to do a major clean-up and revision of hi2. Unfortunately, it's unlikely that it will happen very soon. But, I also want to say that in modern Haskell it is customary to indent |
Thanks for your explanation! Looking forward to the revision, and I think maintaining some wiki pages to be more detailed about these options might help others out, sometimes option descriptions are just not enough for people don't have knowledge of the underlying implementation. However, It's a little off topic but can you provide me some pointer about code style on if-exprs? Since I don't think customary Haskell code indent For one thing we all know that the following code don't work as expect unless some pragma is on:
And I think this indirectly deprecates indenting For another, in many other languages But these are all my personal opinions, I'm happy to following common practice if they sounds more reasonable than my current habit. |
@klao Is there any progress? I really want to format |
@Ailrun this mode is the same as haskell-indentation from haskell-mode. If you have feature requests or issues it's best to send them to haskell-mode. |
@kuribas Oh... but |
I don't know what you mean with various indentations. AFAIK all changes have been merged into haskell-indentation-mode |
I don't understand what does this option means.
Saying I want to write an if expression and have it aligned in the following way:
To be more specific, what I want is:
the line right after
if
to be 2 extra spaces, andthen
andelse
line up with each other.So I set
hi2-ifte-offset
to be2
.If I type in the expression without a tab, I end up with this identation:
If I hit
<tab>
every time after I type inthen
orelse
, I end up with this:And
hi2-ifte-offset
dosen't seem to affect this behavior.Maybe I've totally misunderstood those options, so I open this issue hoping to clean up my confusion.
The text was updated successfully, but these errors were encountered: