diff options
author | Tamar Christina <tamar@zhox.com> | 2015-10-31 18:12:42 +0100 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2015-10-31 18:12:42 +0100 |
commit | 6bef55c6b561080c5ddff73f2c501e40acee86ef (patch) | |
tree | dbf2a1960b7f2e39d8d02cfdfd52571dd5f5aca5 /utils | |
parent | 7a48e6caad54609f1bbefc3bd60e8352edcd2cc7 (diff) | |
download | haskell-6bef55c6b561080c5ddff73f2c501e40acee86ef.tar.gz |
Fix documentation build on windows
Summary:
Fix building new Sphinx documenation on Windows in msys2 using Awson's patch on #11021.
Install Sphinx using `pacman -S mingw-w64-$(uname -m)-python2-sphinx`
Test Plan: Apply patch and ./validate
Reviewers: thomie, bgamari, austin
Reviewed By: thomie, bgamari
Subscribers: erikd
Differential Revision: https://phabricator.haskell.org/D1408
GHC Trac Issues: #11021
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mkUserGuidePart/Main.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/mkUserGuidePart/Main.hs b/utils/mkUserGuidePart/Main.hs index 9bc8caa216..dd72c270d5 100644 --- a/utils/mkUserGuidePart/Main.hs +++ b/utils/mkUserGuidePart/Main.hs @@ -7,6 +7,11 @@ import Types hiding (flag) import Table import Options +import System.IO + +writeFileUtf8 :: FilePath -> String -> IO () +writeFileUtf8 f txt = withFile f WriteMode (\ hdl -> hSetEncoding hdl utf8 >> hPutStr hdl txt) + -- | A ReStructuredText fragment type ReST = String @@ -27,7 +32,7 @@ usersGuideFile fname = "docs/users_guide/"++fname writeRestFile :: FilePath -> ReST -> IO () writeRestFile fname content = - writeFile fname $ unlines + writeFileUtf8 fname $ unlines [ ".. This file is generated by utils/mkUserGuidePart" , "" , content |