From c52f05ed46c4f5ea97be2678f828e1fbd11693c2 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 2 Dec 2011 12:33:26 +0000 Subject: The typechecker is still unfinished but at least it can typecheck the English resource grammar --- src/compiler/GF/Compile/CheckGrammar.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (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 b5d288cc8..d66fdad71 100644 --- a/src/compiler/GF/Compile/CheckGrammar.hs +++ b/src/compiler/GF/Compile/CheckGrammar.hs @@ -174,10 +174,14 @@ checkInfo opts ms (m,mo) c info = do CncCat mty mdef mpr mpmcfg -> do mty <- case mty of - Just (L loc typ) -> chIn loc "linearization type of" $ do - (typ,_) <- checkLType gr [] typ typeType - typ <- computeLType gr [] typ - return (Just (L loc typ)) + Just (L loc typ) -> chIn loc "linearization type of" $ + (if flag optNewComp opts + then do (typ,_) <- CN.checkLType gr typ typeType + typ <- computeLType gr [] typ + return (Just (L loc typ)) + else do (typ,_) <- checkLType gr [] typ typeType + typ <- computeLType gr [] typ + return (Just (L loc typ))) Nothing -> return Nothing mdef <- case (mty,mdef) of (Just (L _ typ),Just (L loc def)) -> -- cgit v1.2.3