tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
950 stars 83 forks source link

ormolu does not handle Unicode correctly #995

Closed Ptival closed 1 year ago

Ptival commented 1 year ago

Describe the bug When ormolu rewrites lines that contain Unicode, it frequently leaves extra characters in the output.

To Reproduce Format the following file

module Unicode where
testing 𝓋 τ =
  let c ↦ d = id
  in (𝓋 ↦ τ) False

Expected behavior Code formatted properly. Instead we get:

module Unicode where
testing 𝓋 τ =
  let c ↦ d = id
   in (𝓋 ↦ τ) Falsee -- Note the extra 'e'
mrkkrp commented 1 year ago

What version of Ormolu are you using? Can you reproduce it on https://ormolu-live.tweag.io/ ? (I could not.)

mrkkrp commented 1 year ago

Closing due to lack of activity. Please free to reopen if you have a way to reproduce it with e.g. Ormolu live.