Skip to content
Snippets Groups Projects
Commit 86a3be29 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Write hoogle output in utf8; fixes GHC build on Windows

parent 395cc6c2
No related branches found
No related tags found
5 merge requests!38Make --no-tmp-comp-dir the default,!37Adapt to latest xhtml version, various optimizations,!31Support HsToken in DataDecl and ClassDecl,!12Drop orphan instance when defined upstream.,!10Haddock interfaces produced from `.hi` files
......@@ -26,7 +26,7 @@ import Data.Char
import Data.List
import Data.Maybe
import System.FilePath
import System.IO
prefix :: [String]
prefix = ["-- Hoogle documentation, generated by Haddock"
......@@ -42,8 +42,10 @@ ppHoogle package version synopsis prologue ifaces odir = do
["@package " ++ package] ++
["@version " ++ version | version /= ""] ++
concat [ppModule i | i <- ifaces, OptHide `notElem` ifaceOptions i]
writeFile (odir </> filename) (unlines contents)
h <- openFile (odir </> filename) WriteMode
hSetEncoding h utf8
hPutStr h (unlines contents)
hClose h
ppModule :: Interface -> [String]
ppModule iface = "" : doc (ifaceDoc iface) ++
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment