diff options
Diffstat (limited to 'src/GF/Compile/Coding.hs')
| -rw-r--r-- | src/GF/Compile/Coding.hs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/GF/Compile/Coding.hs b/src/GF/Compile/Coding.hs index 665b5916d..088f7b8e8 100644 --- a/src/GF/Compile/Coding.hs +++ b/src/GF/Compile/Coding.hs @@ -14,17 +14,14 @@ encodeStringsInModule :: SourceModule -> SourceModule encodeStringsInModule = codeSourceModule encodeUTF8 decodeStringsInModule :: SourceModule -> SourceModule -decodeStringsInModule mo = case mo of - (_,ModMod m) -> case flag optEncoding (flags m) of - UTF_8 -> codeSourceModule decodeUTF8 mo +decodeStringsInModule mo = + case flag optEncoding (flagsModule mo) of + UTF_8 -> codeSourceModule decodeUTF8 mo CP_1251 -> codeSourceModule decodeCP1251 mo - _ -> mo - _ -> mo + _ -> mo -codeSourceModule :: (String -> String) -> SourceModule -> SourceModule -codeSourceModule co (id,moi) = case moi of - ModMod mo -> (id, ModMod $ replaceJudgements mo (mapTree codj (jments mo))) - _ -> (id,moi) +codeSourceModule :: (String -> String) -> SourceModule -> SourceModule +codeSourceModule co (id,mo) = (id,replaceJudgements mo (mapTree codj (jments mo))) where codj (c,info) = case info of ResOper pty pt -> ResOper (mapP codt pty) (mapP codt pt) |
