diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2011-11-30 14:55:52 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2011-11-30 14:55:52 +0000 |
| commit | 7863b21c1a4e8f72d49f3aad76bb9e54dd391cb1 (patch) | |
| tree | 467fe43ceadb62e7381c1446a2e16b3749bb1797 /src/compiler/GF/Compile/CheckGrammar.hs | |
| parent | f9af731c9c850899798701837df0621cac1d1f5c (diff) | |
more stuff in the new type checker
Diffstat (limited to 'src/compiler/GF/Compile/CheckGrammar.hs')
| -rw-r--r-- | src/compiler/GF/Compile/CheckGrammar.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/CheckGrammar.hs b/src/compiler/GF/Compile/CheckGrammar.hs index 9a566ad8d..b5d288cc8 100644 --- a/src/compiler/GF/Compile/CheckGrammar.hs +++ b/src/compiler/GF/Compile/CheckGrammar.hs @@ -28,6 +28,7 @@ import GF.Infra.Option import GF.Compile.TypeCheck.Abstract import GF.Compile.TypeCheck.Concrete import qualified GF.Compile.TypeCheck.ConcreteNew as CN +import qualified GF.Compile.Compute.ConcreteNew as CN import GF.Grammar import GF.Grammar.Lexer @@ -211,7 +212,9 @@ checkInfo opts ms (m,mo) c info = do (pty', pde') <- case (pty,pde) of (Just (L loct ty), Just (L locd de)) -> do ty' <- chIn loct "operation" $ - checkLType gr [] ty typeType >>= computeLType gr [] . fst + (if flag optNewComp opts + then CN.checkLType gr ty typeType >>= return . CN.normalForm gr . fst + else checkLType gr [] ty typeType >>= computeLType gr [] . fst) (de',_) <- chIn locd "operation" $ (if flag optNewComp opts then CN.checkLType gr de ty' |
