[Haskell-cafe] Re: [Haskell] I18N, external strings
bulat.ziganshin at gmail.com
Wed Nov 15 06:57:38 EST 2006
Wednesday, November 15, 2006, 10:36:10 AM, you wrote:
> What methods and tools are there for i18n of Haskell programs?
> In Haskell, I see at least two problems:
> a) reading the file is in IO
if you need utf8 and other encodings support, you can use Streams lib:
h <- openFile "test" ReadMode >>= withEncoding utf8
> b) there are no "global variables". implicit parameters perhaps?
there is a sort of global vars:
ref_command = unsafePerformIO$ newIORef$ error "undefined ref_command"
uiStartCommand command = do
writeIORef ref_command command
uiStartProcessing filelist = do
command <- readIORef ref_command
but implicit parameters, of course, are more intelligent approach
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe