mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 00:52:51 -06:00
Using trie more.
This commit is contained in:
@@ -161,7 +161,7 @@ wordsInTerm trm = filter (not . null) $ case trm of
|
||||
T _ cs -> concat [wo t | Cas _ t <- cs]
|
||||
C s t -> wo s ++ wo t
|
||||
FV ts -> concatMap wo ts
|
||||
K (KP ss vs) -> ss ++ concat [s ++ t | Var s t <- vs]
|
||||
K (KP ss vs) -> ss ++ concat [s | Var s _ <- vs]
|
||||
P t _ -> wo t --- not needed ?
|
||||
_ -> []
|
||||
where wo = wordsInTerm
|
||||
|
||||
@@ -166,4 +166,7 @@ ccompute cnc = comp []
|
||||
noVar v = case v of
|
||||
LI _ -> False
|
||||
R rs -> all noVar [t | Ass _ t <- rs]
|
||||
_ -> True --- other cases?
|
||||
Con _ ts -> all noVar ts
|
||||
FV ts -> all noVar ts
|
||||
S x y -> noVar x && noVar y
|
||||
_ -> True --- other cases that can be values to pattern match?
|
||||
|
||||
Reference in New Issue
Block a user