mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
eliminated one-element suffix lists in GFCC
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user