Haskell newbie here.
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.1
While trying to debug weird locale-related bug in third-party Haskell program, I'm trying to print default encoding:
import System.IO
main = do
print localeEncoding
But it fails:
$ 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 }
My google-fu is failing me. What am I missing?
Show TextEncoding
instance. – sdcvvc