1
0
forked from GitHub/gf-core

eliminated one-element suffix lists in GFCC

This commit is contained in:
aarne
2006-09-05 15:15:02 +00:00
parent 62ca59fea3
commit 8ece9156a2
2 changed files with 2 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ optConcrete defs = subex [C.Lin f (optTerm t) | C.Lin f t <- defs]
-- suffix sets can later be shared by subex elim
optTerm :: C.Term -> C.Term
optTerm tr = case tr of
C.R ts@(_:_) | all isK ts -> mkSuff $ optToks [s | C.K (C.KS s) <- ts]
C.R ts@(_:_:_) | all isK ts -> mkSuff $ optToks [s | C.K (C.KS s) <- ts]
C.R ts -> C.R $ map optTerm ts
C.P t v -> C.P (optTerm t) v
_ -> tr

View File

@@ -153,7 +153,7 @@ unoptimizeCanonMod g = convMod where
ps <- mapM term2patt vs
return $ T ty [Cas [p] t | (p,t) <- zip ps ts]
FV ts -> liftM FV $ mapM exp ts
I _ -> comp t
I _ -> comp t
_ -> composOp exp t
where
alls = allParamValues g