summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorkrangelov <kr.angelov@gmail.com>2020-02-18 15:07:47 +0100
committerkrangelov <kr.angelov@gmail.com>2020-02-18 15:07:47 +0100
commit31339001252a63c0f86ade423cb03095f21c5862 (patch)
tree86d2019366d63602c30a2151538b2c3f6cb8c2a2 /src/compiler
parente15392e5794b8d31ad80b86bf8cc902ebba795d3 (diff)
another bug related to mattern matching on multiword expression
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/GF/Grammar/PatternMatch.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/GF/Grammar/PatternMatch.hs b/src/compiler/GF/Grammar/PatternMatch.hs
index 8fdb33408..9ef191554 100644
--- a/src/compiler/GF/Grammar/PatternMatch.hs
+++ b/src/compiler/GF/Grammar/PatternMatch.hs
@@ -107,6 +107,10 @@ tryMatch (p,t) = do
return (concat matches)
(PT _ p',_) -> trym p' t'
+ (PAs x p',([],K s,[])) -> do
+ subst <- trym p' t'
+ return $ (x,words2term (words s)) : subst
+
(PAs x p',_) -> do
subst <- trym p' t'
return $ (x,t) : subst