Новичок в Haskell здесь.
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.1
Пытаясь отладить странную ошибку, связанную с локалью, в сторонней программе Haskell, я пытаюсь распечатать кодировку по умолчанию:
import System.IO
main = do
print localeEncoding
Но не получается:
$ ghc -o printlocale main.hs
main.hs:4:2:
No instance for (Show TextEncoding)
arising from a use of `print' at main.hs:4:2-21
Possible fix: add an instance declaration for (Show TextEncoding)
In the expression: print localeEncoding
In the expression: do { print localeEncoding }
In the definition of `main': main = do { print localeEncoding }
Мой гугл-фу меня подводит. Что мне не хватает?
Show TextEncodingэкземпляр. - person sdcvvc   schedule 28.08.2012