git.iko.soy/rowtype-yoga/purescript-native
on 367ff16 help sign in
9 lines 244 B history raw
1module System.IO.UTF8
2where
3import System.IO (hGetContents, hSetEncoding, openFile, utf8, IOMode (..))
5readUTF8File :: FilePath -> IO String
6readUTF8File inFile = do
7 h <- openFile inFile ReadMode
8 hSetEncoding h utf8
9 hGetContents h