summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Compile
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-03 10:06:29 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-03 10:06:29 +0000
commit130a75a43a38ff8613f9b9c7c2eeefc87a7701c7 (patch)
tree6e36c278e3fdf75f95db69dc21f7cefc0a1c08cc /src-3.0/GF/Compile
parent8d98fec81eb0bc54cbc8b210c4045a52a0c09d79 (diff)
eliminated copying of inherited overload branches
Diffstat (limited to 'src-3.0/GF/Compile')
-rw-r--r--src-3.0/GF/Compile/CheckGrammar.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src-3.0/GF/Compile/CheckGrammar.hs b/src-3.0/GF/Compile/CheckGrammar.hs
index c580149dc..ce6800f28 100644
--- a/src-3.0/GF/Compile/CheckGrammar.hs
+++ b/src-3.0/GF/Compile/CheckGrammar.hs
@@ -232,16 +232,16 @@ checkResInfo gr mo mm (c,info) = do
return (c, ResOper pty' pde')
ResOverload os tysts -> chIn "overloading" $ do
- --tysts' <- mapM (uncurry $ flip check) tysts
- tysts0 <- checkErr $ lookupOverload gr mo c
- tysts' <- mapM (uncurry $ flip check)
+ tysts' <- mapM (uncurry $ flip check) tysts -- return explicit ones
+ tysts0 <- checkErr $ lookupOverload gr mo c -- check against inherited ones too
+ tysts1 <- mapM (uncurry $ flip check)
[(mkFunType args val,tr) | (args,(val,tr)) <- tysts0]
- let tysts2 = [(y,x) | (x,y) <- tysts']
+ let tysts2 = [(y,x) | (x,y) <- tysts1]
--- this can only be a partial guarantee, since matching
--- with value type is only possible if expected type is given
checkUniq $
sort [t : map snd xs | (x,_) <- tysts2, Ok (xs,t) <- [typeFormCnc x]]
- return (c,ResOverload os tysts2)
+ return (c,ResOverload os [(y,x) | (x,y) <- tysts'])
ResParam (Yes (pcs,_)) -> chIn "parameter type" $ do
---- mapM ((mapM (computeLType gr . snd)) . snd) pcs