summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Lookup.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-02-18 13:53:29 +0000
committeraarne <unknown>2005-02-18 13:53:29 +0000
commit75b03fb624af33c9b90c3f3dccacadf18b442d17 (patch)
tree4731876ea45b88a38a2f71934c55e9be7b4ca632 /src/GF/Grammar/Lookup.hs
parentbafc9fbd0570626749261061c858cbbf95ccdcfb (diff)
working on resource doc and exx, fixing bugs
Diffstat (limited to 'src/GF/Grammar/Lookup.hs')
-rw-r--r--src/GF/Grammar/Lookup.hs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/GF/Grammar/Lookup.hs b/src/GF/Grammar/Lookup.hs
index 06672cb72..d0c8434ce 100644
--- a/src/GF/Grammar/Lookup.hs
+++ b/src/GF/Grammar/Lookup.hs
@@ -60,8 +60,17 @@ lookupResType gr m c = do
-- used in reused concrete
CncCat _ _ _ -> return typeType
- CncFun (Just (_,(cont,val))) _ _ -> return $ mkProd (cont, val, [])
-
+ CncFun (Just (cat,(cont,val))) _ _ -> do
+ val' <- lockRecType cat val
+ return $ mkProd (cont, val', [])
+ CncFun _ _ _ -> do
+ a <- abstractOfConcrete gr m
+ mu <- lookupModMod gr a
+ info <- lookupInfo mu c
+ case info of
+ AbsFun (Yes ty) _ -> return $ redirectTerm m ty
+ AbsCat _ _ -> return typeType
+ _ -> prtBad "cannot find type of reused function" c
AnyInd _ n -> lookupResType gr n c
ResParam _ -> return $ typePType
ResValue (Yes t) -> return $ qualifAnnotPar m t