summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Macros.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Grammar/Macros.hs')
-rw-r--r--src/GF/Grammar/Macros.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/GF/Grammar/Macros.hs b/src/GF/Grammar/Macros.hs
index fa1b75dda..2c0761f00 100644
--- a/src/GF/Grammar/Macros.hs
+++ b/src/GF/Grammar/Macros.hs
@@ -414,7 +414,8 @@ linAsStr s = mkRecord linLabel [K s] -- default linearization {s = s}
term2patt :: Term -> Err Patt
term2patt trm = case termForm trm of
- Ok ([], Vr x, []) -> return (PV x)
+ Ok ([], Vr x, []) | x == identW -> return PW
+ | otherwise -> return (PV x)
Ok ([], Val te ty x, []) -> do
te' <- term2patt te
return (PVal te' ty x)