diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index fe5f27dc6f..5f0f220523 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -18,6 +18,7 @@ This file lists the contributors to the PureScript compiler project, and the ter - [@bsermons](https://github.com/bsermons) (Brian Sermons) My existing contributions and all future contributions until further notice are Copyright Brian Sermons, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - [@cdepillabout](https://github.com/cdepillabout) (Dennis Gosnell) My existing contributions and all future contributions until further notice are Copyright Dennis Gosnell, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - [@charleso](https://github.com/charleso) (Charles O'Farrell) My existing contributions to the PureScript compiler and all future contributions to the PureScript compiler until further notice, are Copyright Charles O'Farrell, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). +- [@chrisdone](https://github.com/chrisdone) (Chris Done) - My existing contributions and all future contributions until further notice are Copyright Chris Done, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license. - [@chrissmoak](https://github.com/chrissmoak) (Chris Smoak) My existing contributions to the PureScript compiler and all future contributions to the PureScript compiler until further notice, are Copyright Chris Smoak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - [@codedmart](https://github.com/codedmart) (Brandon Martin) My existing contributions and all future contributions until further notice are Copyright Brandon Martin, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - [@davidchambers](https://github.com/davidchambers) (David Chambers) My existing contributions and all future contributions until further notice are Copyright David Chambers, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). diff --git a/src/System/IO/UTF8.hs b/src/System/IO/UTF8.hs index fe2788f4d7..a69dded993 100644 --- a/src/System/IO/UTF8.hs +++ b/src/System/IO/UTF8.hs @@ -2,24 +2,13 @@ module System.IO.UTF8 where import Prelude.Compat -import System.IO ( IOMode(..) - , hGetContents - , hSetEncoding - , hClose - , hPutStr - , openFile - , utf8 - ) +import qualified Data.ByteString as BS +import qualified Data.ByteString.UTF8 as UTF8 readUTF8File :: FilePath -> IO String readUTF8File inFile = do - h <- openFile inFile ReadMode - hSetEncoding h utf8 - hGetContents h + fmap UTF8.toString (BS.readFile inFile) writeUTF8File :: FilePath -> String -> IO () writeUTF8File inFile text = do - h <- openFile inFile WriteMode - hSetEncoding h utf8 - hPutStr h text - hClose h + BS.writeFile inFile (UTF8.fromString text)