From 7863b21c1a4e8f72d49f3aad76bb9e54dd391cb1 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Wed, 30 Nov 2011 14:55:52 +0000 Subject: more stuff in the new type checker --- src/compiler/GF/Compile/CheckGrammar.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/compiler/GF/Compile/CheckGrammar.hs') 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' -- cgit v1.2.3