diff options
| author | krasimir <krasimir@chalmers.se> | 2009-10-28 16:47:01 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-10-28 16:47:01 +0000 |
| commit | 980844a4ad13c0423a3223f0e89e43d6e9be1ba3 (patch) | |
| tree | 810ad7002888c5f5f3847d8a6b7b9773c9672576 /src/GF/Compile/Update.hs | |
| parent | f2e5281602516e1c0eb4a2f69d64e6c075fb79da (diff) | |
restructure ResParam and ResValue
Diffstat (limited to 'src/GF/Compile/Update.hs')
| -rw-r--r-- | src/GF/Compile/Update.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/GF/Compile/Update.hs b/src/GF/Compile/Update.hs index e4e827451..1e39a2e03 100644 --- a/src/GF/Compile/Update.hs +++ b/src/GF/Compile/Update.hs @@ -162,7 +162,7 @@ extendMod gr isCompl (name,cond) base old new = foldM try new $ Map.toList old indirInfo n info = AnyInd b n' where (b,n') = case info of ResValue _ -> (True,n) - ResParam _ -> (True,n) + ResParam _ _ -> (True,n) AbsFun _ _ Nothing -> (True,n) AnyInd b k -> (b,k) _ -> (False,n) ---- canonical in Abs @@ -174,9 +174,11 @@ unifyAnyInfo m i j = case (i,j) of (AbsFun mt1 ma1 md1, AbsFun mt2 ma2 md2) -> liftM3 AbsFun (unifMaybe mt1 mt2) (unifAbsArrity ma1 ma2) (unifAbsDefs md1 md2) -- adding defs - (ResParam mt1, ResParam mt2) -> liftM ResParam $ unifMaybe mt1 mt2 - (ResValue mt1, ResValue mt2) -> - liftM ResValue $ unifMaybe mt1 mt2 + (ResParam mt1 mv1, ResParam mt2 mv2) -> + liftM2 ResParam (unifMaybe mt1 mt2) (unifMaybe mv1 mv2) + (ResValue t1, ResValue t2) + | t1==t2 -> return (ResValue t1) + | otherwise -> fail "" (_, ResOverload ms t) | elem m ms -> return $ ResOverload ms t (ResOper mt1 m1, ResOper mt2 m2) -> |
