summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/CheckGrammar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/GF/Compile/CheckGrammar.hs')
-rw-r--r--src/compiler/GF/Compile/CheckGrammar.hs6
1 files changed, 3 insertions, 3 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