1
0
forked from GitHub/gf-core

A somewhat better solution to the words/UTF-8 problem: do encoding last, but only on what appears to be string literals.

This commit is contained in:
bjorn
2008-09-15 13:16:04 +00:00
parent dbb0f3f3e4
commit 3a7888e660
3 changed files with 12 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do
generateModuleCode :: Options -> FilePath -> SourceModule -> IOE SourceModule
generateModuleCode opts file minfo = do
let minfo1 = subexpModule minfo
out = prGrammar (MGrammar [codeSourceModule encodeUTF8 minfo1])
out = codeStringLiterals encodeUTF8 $ prGrammar (MGrammar [minfo1])
putPointE Normal opts (" wrote file" +++ file) $ ioeIO $ writeFile file $ out
return minfo1