diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-07-05 14:08:58 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-07-05 14:08:58 +0000 |
| commit | 63f060dcf62a23c518379c46af40461afacfb27c (patch) | |
| tree | 40e0ce806203b39729965bc23e04a0d3d1e18058 /src/GF/Compile/CheckGrammar.hs | |
| parent | 4d228365aca9b5ed2ea90dd706a866042e776b14 (diff) | |
hacky solution to name resolution warnings
Diffstat (limited to 'src/GF/Compile/CheckGrammar.hs')
| -rw-r--r-- | src/GF/Compile/CheckGrammar.hs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs index e980ec14f..d9dfe996d 100644 --- a/src/GF/Compile/CheckGrammar.hs +++ b/src/GF/Compile/CheckGrammar.hs @@ -45,6 +45,8 @@ import GF.Infra.CheckM import Data.List import Control.Monad +import Debug.Trace --- + showCheckModule :: [SourceModule] -> SourceModule -> Err ([SourceModule],String) showCheckModule mos m = do @@ -380,16 +382,18 @@ inferLType gr trm = case trm of Q m ident | isPredef m -> termWith trm $ checkErr (typPredefined ident) Q m ident -> checks [ ----- do ----- over <- getOverload gr Nothing trm ----- case over of ----- Just trty -> return trty ----- _ -> fail "not overloaded" ----- , termWith trm $ checkErr (lookupResType gr m ident) >>= comp , checkErr (lookupResDef gr m ident) >>= infer , +{- + do + over <- getOverload gr Nothing trm + case over of + Just trty -> return trty + _ -> prtFail "not overloaded" trm + , +-} prtFail "cannot infer type of constant" trm ] @@ -494,8 +498,9 @@ inferLType gr trm = case trm of ---- hack from Rename.identRenameTerm, to live with files with naming conflicts 18/6/2007 Strs (Cn (IC "#conflict") : ts) -> do - checkWarn ("WARNING: unresolved constant, could be any of" +++ unwords (map prt ts)) - infer $ head ts + trace ("WARNING: unresolved constant, could be any of" +++ unwords (map prt ts)) (infer $ head ts) +-- checkWarn ("WARNING: unresolved constant, could be any of" +++ unwords (map prt ts)) +-- infer $ head ts Strs ts -> do ts' <- mapM (\t -> justCheck t typeStr) ts |
