diff options
Diffstat (limited to 'src/GF/Grammar/PatternMatch.hs')
| -rw-r--r-- | src/GF/Grammar/PatternMatch.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/GF/Grammar/PatternMatch.hs b/src/GF/Grammar/PatternMatch.hs index 7635e6fa1..804333b14 100644 --- a/src/GF/Grammar/PatternMatch.hs +++ b/src/GF/Grammar/PatternMatch.hs @@ -56,6 +56,9 @@ tryMatch (p,t) = do where trym p t' = case (p,t') of + (PVal _ i, (_,Val _ j,_)) + | i == j -> return [] + | otherwise -> Bad $ "no match of values" (_,(x,Empty,y)) -> trym p (x,K [],y) -- because "" = [""] = [] (PV IW, _) | isInConstantForm t -> return [] -- optimization with wildcard (PV x, _) | isInConstantForm t -> return [(x,t)] |
