summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-11-14 09:21:34 +0000
committerkrasimir <krasimir@chalmers.se>2009-11-14 09:21:34 +0000
commit4c17b7ba95dcbfe7dd485857222b3828621719cc (patch)
treeb98f2efad38cc228218eff2740e0e5b8735e407c /src
parentee97e0b963a94cb13add8d2c8f42afc4ea26cad7 (diff)
lookupResType should always return the precomputed CncFun type
Diffstat (limited to 'src')
-rw-r--r--src/GF/Grammar/Lookup.hs15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/GF/Grammar/Lookup.hs b/src/GF/Grammar/Lookup.hs
index ef1395d1f..074f0c5ec 100644
--- a/src/GF/Grammar/Lookup.hs
+++ b/src/GF/Grammar/Lookup.hs
@@ -89,26 +89,13 @@ lookupResType gr m c = do
-- used in reused concrete
CncCat _ _ _ -> return typeType
- CncFun (Just (cat,cont@(_:_),val)) _ _ -> do
+ CncFun (Just (cat,cont,val)) _ _ -> do
val' <- lock cat val
return $ mkProd cont val' []
- CncFun _ _ _ -> lookFunType m m c
AnyInd _ n -> lookupResType gr n c
ResParam _ _ -> return typePType
ResValue t -> return t
_ -> Bad $ render (ppIdent c <+> text "has no type defined in resource" <+> ppIdent m)
- where
- lookFunType e m c = do
- a <- abstractOfConcrete gr m
- lookFun e m c a
- lookFun e m c a = do
- mu <- lookupModule gr a
- info <- lookupIdentInfo mu c
- case info of
- AbsFun (Just ty) _ _ -> return $ redirectTerm e ty
- AbsCat _ _ -> return typeType
- AnyInd _ n -> lookFun e m c n
- _ -> Bad (render (text "cannot find type of reused function" <+> ppIdent c))
lookupOverload :: SourceGrammar -> Ident -> Ident -> Err [([Type],(Type,Term))]
lookupOverload gr m c = do