summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/CheckGrammar.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2011-12-02 12:33:26 +0000
committerkr.angelov <kr.angelov@gmail.com>2011-12-02 12:33:26 +0000
commitc52f05ed46c4f5ea97be2678f828e1fbd11693c2 (patch)
treef8d7658527ba3ce105c6cca5a93e06956045b47d /src/compiler/GF/Compile/CheckGrammar.hs
parent9baa13476a737e8671c9260ae8de8a499416022e (diff)
The typechecker is still unfinished but at least it can typecheck the English resource grammar
Diffstat (limited to 'src/compiler/GF/Compile/CheckGrammar.hs')
-rw-r--r--src/compiler/GF/Compile/CheckGrammar.hs12
1 files changed, 8 insertions, 4 deletions
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)) ->