mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-06 01:32:50 -06:00
cleand up Structural
This commit is contained in:
@@ -143,13 +143,13 @@ redCTerm x = case x of
|
||||
P term label -> liftM2 G.P (redCTerm term) (return $ redLabel label)
|
||||
T ctype cases -> do
|
||||
ctype' <- redCType ctype
|
||||
let (ps,ts) = unzip [(p,t) | Cas ps t <- cases, p <- ps] --- destroys sharing
|
||||
ps' <- mapM redPatt ps
|
||||
ts' <- mapM redCTerm ts --- duplicates work for shared rhss
|
||||
let (ps,ts) = unzip [(ps,t) | Cas ps t <- cases]
|
||||
ps' <- mapM (mapM redPatt) ps
|
||||
ts' <- mapM redCTerm ts
|
||||
let tinfo = case ps' of
|
||||
[G.PV _] -> G.TTyped ctype'
|
||||
[[G.PV _]] -> G.TTyped ctype'
|
||||
_ -> G.TComp ctype'
|
||||
return $ G.T tinfo $ zip ps' ts'
|
||||
return $ G.TSh tinfo $ zip ps' ts'
|
||||
V ctype ts -> do
|
||||
ctype' <- redCType ctype
|
||||
ts' <- mapM redCTerm ts
|
||||
|
||||
Reference in New Issue
Block a user