summaryrefslogtreecommitdiff
path: root/src/GF/Canon
diff options
context:
space:
mode:
authoraarne <unknown>2003-11-18 15:30:08 +0000
committeraarne <unknown>2003-11-18 15:30:08 +0000
commitaf4bf660024928da20b3a1e004d347d6bc0647c4 (patch)
tree53e4bea7a712ec02dd49b7893df0a42ac86d810d /src/GF/Canon
parent8ecf475d5a4c09939ee76106440bf08878be34b4 (diff)
Using trie more.
Diffstat (limited to 'src/GF/Canon')
-rw-r--r--src/GF/Canon/CMacros.hs2
-rw-r--r--src/GF/Canon/Look.hs5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/GF/Canon/CMacros.hs b/src/GF/Canon/CMacros.hs
index 647cf9600..85a465871 100644
--- a/src/GF/Canon/CMacros.hs
+++ b/src/GF/Canon/CMacros.hs
@@ -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
diff --git a/src/GF/Canon/Look.hs b/src/GF/Canon/Look.hs
index 1f55e4cdb..228a43f3c 100644
--- a/src/GF/Canon/Look.hs
+++ b/src/GF/Canon/Look.hs
@@ -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?