summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-03-05 19:18:51 +0000
committerkrasimir <krasimir@chalmers.se>2009-03-05 19:18:51 +0000
commit30c1342169ed0417f7b8be60d8f1c95dbedf639b (patch)
tree7be5ea7343e704e0e5f3b20d679a6892063e406a /src
parent10b0a9032372201d26b448a550fc31932e845321 (diff)
fix the update of overloaded functions
Diffstat (limited to 'src')
-rw-r--r--src/GF/Compile/Update.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GF/Compile/Update.hs b/src/GF/Compile/Update.hs
index 1200e51c0..ba4a91874 100644
--- a/src/GF/Compile/Update.hs
+++ b/src/GF/Compile/Update.hs
@@ -35,7 +35,7 @@ buildAnyTree m = go Map.empty
go map [] = return map
go map ((c,j):is) = do
case Map.lookup c map of
- Just i -> case unifyAnyInfo c i j of
+ Just i -> case unifyAnyInfo m i j of
Ok k -> go (Map.insert c k map) is
Bad _ -> fail $ render (text "cannot unify the informations" $$
nest 4 (ppJudgement Qualified (c,i)) $$
@@ -141,7 +141,7 @@ extendMod gr isCompl (name,cond) base old new = foldM try new $ Map.toList old
try new (c,i)
| not (cond c) = return new
| otherwise = case Map.lookup c new of
- Just j -> case unifyAnyInfo c i j of
+ Just j -> case unifyAnyInfo name i j of
Ok k -> return $ updateTree (c,k) new
Bad _ -> do (base,j) <- case j of
AnyInd _ m -> lookupOrigInfo gr m c
@@ -168,7 +168,7 @@ extendMod gr isCompl (name,cond) base old new = foldM try new $ Map.toList old
_ -> (False,n) ---- canonical in Abs
unifyAnyInfo :: Ident -> Info -> Info -> Err Info
-unifyAnyInfo c i j = case (i,j) of
+unifyAnyInfo m i j = case (i,j) of
(AbsCat mc1 mf1, AbsCat mc2 mf2) ->
liftM2 AbsCat (unifMaybe mc1 mc2) (unifConstrs mf1 mf2) -- adding constrs
(AbsFun mt1 md1, AbsFun mt2 md2) ->
@@ -177,7 +177,7 @@ unifyAnyInfo c i j = case (i,j) of
(ResParam mt1, ResParam mt2) -> liftM ResParam $ unifMaybe mt1 mt2
(ResValue mt1, ResValue mt2) ->
liftM ResValue $ unifMaybe mt1 mt2
- (_, ResOverload ms t) | elem c ms ->
+ (_, ResOverload ms t) | elem m ms ->
return $ ResOverload ms t
(ResOper mt1 m1, ResOper mt2 m2) ->
liftM2 ResOper (unifMaybe mt1 mt2) (unifMaybe m1 m2)