diff options
Diffstat (limited to 'src/compiler/GF/Compile')
| -rw-r--r-- | src/compiler/GF/Compile/CheckGrammar.hs | 6 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/GrammarToPGF.hs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/CheckGrammar.hs b/src/compiler/GF/Compile/CheckGrammar.hs index 568686f92..d924e413e 100644 --- a/src/compiler/GF/Compile/CheckGrammar.hs +++ b/src/compiler/GF/Compile/CheckGrammar.hs @@ -298,9 +298,9 @@ checkInfo opts sgr (m,mo) c info = do -- | for grammars obtained otherwise than by parsing ---- update!! checkReservedId :: Ident -> Check () -checkReservedId x - | isReservedWord (ident2bs x) = checkWarn (text "reserved word used as identifier:" <+> ppIdent x) - | otherwise = return () +checkReservedId x = + when (isReservedWord x) $ + checkWarn (text "reserved word used as identifier:" <+> ppIdent x) -- auxiliaries diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs index 25db4bac7..5917b709c 100644 --- a/src/compiler/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/GF/Compile/GrammarToPGF.hs @@ -5,7 +5,7 @@ module GF.Compile.GrammarToPGF (mkCanon2pgf) where import GF.Compile.GeneratePMCFG import GF.Compile.GenerateBC -import PGF(CId,mkCId,bsCId) +import PGF(CId,mkCId,utf8CId) import PGF.Data(fidInt,fidFloat,fidString,fidVar) import PGF.Optimize(updateProductionIndices) --import qualified PGF.Macros as CM @@ -103,7 +103,7 @@ mkCanon2pgf opts gr am = do return (seqs, ((m,id), info) : is) i2i :: Ident -> CId -i2i = bsCId . ident2bs +i2i = utf8CId . ident2utf8 mkType :: [Ident] -> A.Type -> C.Type mkType scope t = |
