{-# LANGUAGE CPP #-}-- | IO functions which are used when reading from standard input and-- writing to standard output. Uses the UTF-8 character encoding under-- versions of the base library up to 4.1, and whatever the locale-- specifies under base 4.2 (and later?; only if the locale is-- supported, see "System.IO").---- Note that 'hSetEncoding' can be used to change the behaviour of the-- functions below if base 4.2 (or later?) is used.moduleAgda.Utils.IO.Locale(print,putStr,putStrLn,stdoutFlush,hGetContents)whereimportPrelude(Show,IO,String)importSystem.IO(Handle,hFlush,stdout)#if MIN_VERSION_base(4,2,0)importqualifiedPreludeimportqualifiedSystem.IOasIO#elseimportqualifiedSystem.IO.UTF8asUTF8#endifstdoutFlush::IO()stdoutFlush=hFlushstdout-- | Prints the value.print::Showa=>a->IO()#if MIN_VERSION_base(4,2,0)print=Prelude.print#elseprint=UTF8.print#endif-- | Prints the string.putStr::String->IO()#if MIN_VERSION_base(4,2,0)putStr=Prelude.putStr#elseputStr=UTF8.putStr#endif-- | Prints the string with an appended newline.putStrLn::String->IO()#if MIN_VERSION_base(4,2,0)putStrLn=Prelude.putStrLn#elseputStrLn=UTF8.putStrLn#endif-- | Returns the stream represented by the handle lazily.hGetContents::Handle->IOString#if MIN_VERSION_base(4,2,0)hGetContents=IO.hGetContents#elsehGetContents=UTF8.hGetContents#endif