diff options
| author | aarne <unknown> | 2005-06-23 13:32:43 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2005-06-23 13:32:43 +0000 |
| commit | 22b5b12a2a80835eb5792f3687106084eb95bd0d (patch) | |
| tree | f042b573418181eed582908e1508501bfcb7e7d1 /src/GF/Canon | |
| parent | 34e441d2e35ade46ed560bf7f4139c16a7b0c505 (diff) | |
finnish vowel harmony unlexer ; optimizations and mcfg
Diffstat (limited to 'src/GF/Canon')
| -rw-r--r-- | src/GF/Canon/CMacros.hs | 13 | ||||
| -rw-r--r-- | src/GF/Canon/Look.hs | 12 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/GF/Canon/CMacros.hs b/src/GF/Canon/CMacros.hs index 77f4b0027..c5268b8cb 100644 --- a/src/GF/Canon/CMacros.hs +++ b/src/GF/Canon/CMacros.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/06/23 13:23:01 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.26 $ +-- > CVS $Date: 2005/06/23 14:32:43 $ +-- > CVS $Author: aarne $ +-- > CVS $Revision: 1.27 $ -- -- Macros for building and analysing terms in GFC concrete syntax. -- @@ -290,7 +290,8 @@ composOp co trm = do as' <- mapM co as return (FV as') - -- peb tried to do this, but then there were errors in GF.Canon.Look.ccompute: - -- V x as -> do as' <- mapM co as - -- return (V x as') + V x as -> + do + as' <- mapM co as + return (V x as') _ -> return trm -- covers Arg, I, LI, K, E 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? |
