diff options
| author | aarne <aarne@cs.chalmers.se> | 2006-06-18 19:23:00 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2006-06-18 19:23:00 +0000 |
| commit | d1dc04747bbcd198379449f96759488d57ade386 (patch) | |
| tree | 01c08009b128fde6808266d18d85d59e822cb471 /src/GF/Grammar | |
| parent | 4204b3e4ebc344d4971094ced7d3d78035a8ef02 (diff) | |
restored lock fields with a clearer warning
Diffstat (limited to 'src/GF/Grammar')
| -rw-r--r-- | src/GF/Grammar/Lookup.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/GF/Grammar/Lookup.hs b/src/GF/Grammar/Lookup.hs index 630b9c204..337329d44 100644 --- a/src/GF/Grammar/Lookup.hs +++ b/src/GF/Grammar/Lookup.hs @@ -33,6 +33,10 @@ import GF.Grammar.Lockfield import Data.List (nub) import Control.Monad +-- whether lock fields are added in reuse +lock c = lockRecType c -- return +unlock c = unlockRecord c -- return + lookupResDef :: SourceGrammar -> Ident -> Ident -> Err Term lookupResDef gr m c = look True m c where look isTop m c = do @@ -45,9 +49,9 @@ lookupResDef gr m c = look True m c where ResOper _ Nope -> return (Q m c) ---- if isTop then lookExt m c ---- else prtBad "cannot find in exts" c - CncCat (Yes ty) _ _ -> return ty ---- lockRecType c $ ty - CncCat _ _ _ -> return defLinType ---- lockRecType c $ defLinType - CncFun _ (Yes tr) _ -> return tr ---- unlockRecord c tr + CncCat (Yes ty) _ _ -> lock c ty + CncCat _ _ _ -> lock c defLinType + CncFun _ (Yes tr) _ -> unlock c tr AnyInd _ n -> look False n c ResParam _ -> return $ QC m c @@ -70,7 +74,7 @@ lookupResType gr m c = do -- used in reused concrete CncCat _ _ _ -> return typeType CncFun (Just (cat,(cont,val))) _ _ -> do - val' <- return val ---- lockRecType cat val + val' <- lock cat val return $ mkProd (cont, val', []) CncFun _ _ _ -> lookFunType m m c AnyInd _ n -> lookupResType gr n c |
