(Merged yesterday in this pull request.)
Many people were against Unicode syntax because the symbols it requires are not found on a typical keyboard, so they are hard to write. This is not needed anymore. Write ASCII and let Fourmolu convert it to Unicode!
(In the event that your font or terminal is strictly 8 bit, worry not: Fourmolu can convert back to ASCII as well!)
Get Fourmolu.
- Clone https://github.com/fourmolu/fourmolu/.
- Run
cabal install
there. - Hopefully it will work!
Go!
- (Commit your stuff.)
- Put
UnicodeSyntax
somewhere Fourmolu can see, say in thedefault-extensions
of your Cabal manifest. - Run
fourmolu --mode inplace --unicode detect [your Haskell files]
. - Enjoy!
Not to your liking? Convert back:
- (Commit your stuff.)
- Run
fourmolu --mode inplace --unicode never [your Haskell files]
. - Remove
UnicodeSyntax
from wherever you put it before. - Enjoy!
aside
Alternatively, you can put those symbols onto your keyboard in a matter of minutes. Check out for example this fantastic project.
What a time to be alive!
Like, share, and have a good day!