mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-25 18:58:56 -06:00
more french
This commit is contained in:
@@ -151,7 +151,7 @@ matchPatt cs0 (FV ts) = liftM FV $ mapM (matchPatt cs0) ts
|
|||||||
matchPatt cs0 trm = term2patt trm >>= match cs0 where
|
matchPatt cs0 trm = term2patt trm >>= match cs0 where
|
||||||
match cs t =
|
match cs t =
|
||||||
case cs of
|
case cs of
|
||||||
Cas ps b :_ | elem t ps -> return b
|
Cas ps b :_ | elem t ps -> return b
|
||||||
_:cs' -> match cs' t
|
_:cs' -> match cs' t
|
||||||
[] -> Bad $ "pattern not found for" +++ prt t
|
[] -> Bad $ "pattern not found for" +++ prt t
|
||||||
+++ "among" ++++ unlines (map prt cs0) ---- debug
|
+++ "among" ++++ unlines (map prt cs0) ---- debug
|
||||||
|
|||||||
@@ -717,14 +717,14 @@ pattContext env typ p = case p of
|
|||||||
g1 <- pattContext env typ p
|
g1 <- pattContext env typ p
|
||||||
g2 <- pattContext env typ q
|
g2 <- pattContext env typ q
|
||||||
return $ g1 ++ g2
|
return $ g1 ++ g2
|
||||||
PRep p' -> noBind p'
|
PRep p' -> noBind typeStr p'
|
||||||
PNeg p' -> noBind p'
|
PNeg p' -> noBind typ p'
|
||||||
|
|
||||||
_ -> return [] ---- check types!
|
_ -> return [] ---- check types!
|
||||||
where
|
where
|
||||||
cnc = env
|
cnc = env
|
||||||
noBind p' = do
|
noBind typ p' = do
|
||||||
co <- pattContext env typeStr p'
|
co <- pattContext env typ p'
|
||||||
if not (null co)
|
if not (null co)
|
||||||
then checkWarn ("no variable bound inside pattern" +++ prt p)
|
then checkWarn ("no variable bound inside pattern" +++ prt p)
|
||||||
>> return []
|
>> return []
|
||||||
|
|||||||
Reference in New Issue
Block a user