summaryrefslogtreecommitdiff
path: root/src/GF/GFCC
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-10-16 17:38:57 +0000
committeraarne <aarne@cs.chalmers.se>2007-10-16 17:38:57 +0000
commitcec3d7d603a9e810c3b7f1287f7328ec39cff98d (patch)
tree5bbe992775ad6bd4ad78a6e2fc6c9c99c462ff77 /src/GF/GFCC
parent869da61a5b965f4a6db9d54706ce333a902298d4 (diff)
found and temporarily solved the bug in LangGer gfcc generation
Diffstat (limited to 'src/GF/GFCC')
-rw-r--r--src/GF/GFCC/Linearize.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/GFCC/Linearize.hs b/src/GF/GFCC/Linearize.hs
index 572b8fe08..b7b419f7d 100644
--- a/src/GF/GFCC/Linearize.hs
+++ b/src/GF/GFCC/Linearize.hs
@@ -6,6 +6,8 @@ import GF.GFCC.AbsGFCC
import Data.Map
import Data.List
+import Debug.Trace
+
-- linearization and computation of concrete GFCC Terms
linearize :: GFCC -> CId -> Exp -> String
@@ -53,7 +55,7 @@ compute mcfg lang args = comp where
look = lookOper mcfg lang
idx xs i = if i > length xs - 1
- then error
+ then trace
("too large " ++ show i ++ " for\n" ++ unlines (lmap prt xs) ++ "\n") TM
else xs !! i
@@ -71,7 +73,7 @@ compute mcfg lang args = comp where
C i -> i
RP p _ -> getIndex p ---- DEPREC
TM -> 0 -- default value for parameter
- _ -> error ("ERROR in grammar compiler: index from " ++ show t) 0
+ _ -> trace ("ERROR in grammar compiler: index from " ++ show t) 666
getField t i = case t of
R rs -> idx rs i