summaryrefslogtreecommitdiff
path: root/src/GF/Canon/Look.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-06-23 13:32:43 +0000
committeraarne <unknown>2005-06-23 13:32:43 +0000
commit22b5b12a2a80835eb5792f3687106084eb95bd0d (patch)
treef042b573418181eed582908e1508501bfcb7e7d1 /src/GF/Canon/Look.hs
parent34e441d2e35ade46ed560bf7f4139c16a7b0c505 (diff)
finnish vowel harmony unlexer ; optimizations and mcfg
Diffstat (limited to 'src/GF/Canon/Look.hs')
-rw-r--r--src/GF/Canon/Look.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/GF/Canon/Look.hs b/src/GF/Canon/Look.hs
index 231014abc..bcd73f97d 100644
--- a/src/GF/Canon/Look.hs
+++ b/src/GF/Canon/Look.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/06/17 14:15:17 $
--- > CVS $Author: bringert $
--- > CVS $Revision: 1.14 $
+-- > CVS $Date: 2005/06/23 14:32:43 $
+-- > CVS $Author: aarne $
+-- > CVS $Revision: 1.15 $
--
-- lookup in GFC. AR 2003
-----------------------------------------------------------------------------
@@ -125,8 +125,8 @@ ccompute :: CanonGrammar -> [Term] -> Term -> Err Term
ccompute cnc = comp []
where
comp g xs t = case t of
- Arg (A _ i) -> errIn ("argument list") $ xs !? fromInteger i
- Arg (AB _ _ i) -> errIn ("argument list for binding") $ xs !? fromInteger i
+ Arg (A _ i) -> err (const (return t)) return $ xs !? fromInteger i
+ Arg (AB _ _ i) -> err (const (return t)) return $ xs !? fromInteger i
I c -> look c
LI c -> lookVar c g
@@ -194,8 +194,10 @@ ccompute cnc = comp []
noVar v = case v of
LI _ -> False
+ Arg _ -> False
R rs -> all noVar [t | Ass _ t <- rs]
Par _ ts -> all noVar ts
FV ts -> all noVar ts
S x y -> noVar x && noVar y
+ P t _ -> noVar t
_ -> True --- other cases that can be values to pattern match?