stylish-haskell
stylish-haskell copied to clipboard
UTF8 in type parameters is broken
Take this code:
data Foo = Foo { foo :: Foo "кек" }
There are non-ASCII UTF8 symbols in the type parameter (and it's perfectly OK).
stylish-haskell does this:
data Foo
= Foo
{ foo :: Foo "\1082\1077\1082"
}
This is unacceptable of course :)
I started looking into this issue, but I am having a hard time recreating it. What are your locale settings?
$ locale
LANG="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_CTYPE="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_ALL=
I'm on macOS 10.14 if that matters.
Can you provide your configuration as well?
@jhmcstanton just uncomment records: part in the default config without changing anything else, it's enough to trigger this.
@jaspervdj any idea where to look to resolve this issue? So far I have added tests that show the incorrect behavior and checked
putTypeinPrinter- printing of string literals in
Imports - a smattering of other places
but I have not had luck finding where this issue might be.