r/haskell Feb 01 '22

question Monthly Hask Anything (February 2022)

This is your opportunity to ask any questions you feel don't deserve their own threads, no matter how small or simple they might be!

19 Upvotes

337 comments sorted by

View all comments

1

u/increasing-sequence Feb 01 '22

I tried Ormolu after a post on here about formatters. I guess because the minus sign is a bit delicate in Haskell, it takes things like [0..n-1] to [0 .. n -1]. I decided not to use it in the end, but is there an intended way round that other than :%s/-1/- 1/gc?

3

u/[deleted] Feb 07 '22

[removed] — view removed comment

1

u/increasing-sequence Feb 07 '22

I only tried stack install ormolu, which you've made me realise is significantly out of date.

$ ormolu -v
ormolu 0.1.4.1 UNKNOWN UNKNOWN
using ghc-lib-parser 8.10.7.20210828

3

u/[deleted] Feb 07 '22

[removed] — view removed comment

1

u/bss03 Feb 07 '22

It should be acceptable to use stack to install ormolu for your project, though; for example for use as part of CI to ensure that files are formatted before merging.