diff options
| author | krasimir <krasimir@chalmers.se> | 2016-03-02 13:38:02 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2016-03-02 13:38:02 +0000 |
| commit | 47eb774cdf297b21b226a5699f954aadd9aa47e5 (patch) | |
| tree | e188929fbe1e15fb3e79ac0f0559b9410a1fdd8d /src/compiler/GF/Compile/CheckGrammar.hs | |
| parent | 672c1e8df530f82b8a9c0f7199bf8eee14ad1eb0 (diff) | |
the experimental type checker in GF.Compile.TypeCheck.ConcreteNew is now rewriten to use the complete evaluator in GF.Compile.Compute.ConcreteNew. The old sketchy implementation in GF.Compile.Compute.ConcreteNew1 is now removed.
Diffstat (limited to 'src/compiler/GF/Compile/CheckGrammar.hs')
| -rw-r--r-- | src/compiler/GF/Compile/CheckGrammar.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/GF/Compile/CheckGrammar.hs b/src/compiler/GF/Compile/CheckGrammar.hs index 1e43c68bd..5c1743b74 100644 --- a/src/compiler/GF/Compile/CheckGrammar.hs +++ b/src/compiler/GF/Compile/CheckGrammar.hs @@ -177,7 +177,7 @@ checkInfo opts cwd sgr (m,mo) c info = checkInModule cwd mo NoLoc empty $ do mty <- case mty of Just (L loc typ) -> chIn loc "linearization type of" $ (if False --flag optNewComp opts - then do (typ,_) <- CN.checkLType gr typ typeType + then do (typ,_) <- CN.checkLType (CN.resourceValues opts gr) typ typeType typ <- computeLType gr [] typ return (Just (L loc typ)) else do (typ,_) <- checkLType gr [] typ typeType @@ -224,17 +224,17 @@ checkInfo opts cwd sgr (m,mo) c info = checkInModule cwd mo NoLoc empty $ do (Just (L loct ty), Just (L locd de)) -> do ty' <- chIn loct "operation" $ (if False --flag optNewComp opts - then CN.checkLType gr ty typeType >>= return . CN.normalForm (CN.resourceValues opts gr) (L loct c) . fst -- !! + then CN.checkLType (CN.resourceValues opts gr) ty typeType >>= return . CN.normalForm (CN.resourceValues opts gr) (L loct c) . fst -- !! else checkLType gr [] ty typeType >>= computeLType gr [] . fst) (de',_) <- chIn locd "operation" $ (if False -- flag optNewComp opts - then CN.checkLType gr de ty' + then CN.checkLType (CN.resourceValues opts gr) de ty' else checkLType gr [] de ty') return (Just (L loct ty'), Just (L locd de')) (Nothing , Just (L locd de)) -> do (de',ty') <- chIn locd "operation" $ (if False -- flag optNewComp opts - then CN.inferLType gr de + then CN.inferLType (CN.resourceValues opts gr) de else inferLType gr [] de) return (Just (L locd ty'), Just (L locd de')) (Just (L loct ty), Nothing) -> do |
