From d95ca4a103c9023aa104b25acdc9c21418de6a14 Mon Sep 17 00:00:00 2001 From: krasimir Date: Mon, 19 Jan 2009 13:23:03 +0000 Subject: refactor the GF.Grammar.Grammar syntax. The obsolete constructions are removed --- src/GF/Compile.hs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/GF/Compile.hs') diff --git a/src/GF/Compile.hs b/src/GF/Compile.hs index e7e16013c..e4804bd18 100644 --- a/src/GF/Compile.hs +++ b/src/GF/Compile.hs @@ -39,6 +39,7 @@ import System.Time import qualified Data.Map as Map import qualified Data.Set as Set import Data.List(nub) +import Data.Maybe (isNothing) import PGF.Check import PGF.CId @@ -172,12 +173,9 @@ compileOne opts env@(_,srcgr,_) file = do -- sm is optimized before generation, but not in the env extendCompileEnvInt env k' (Just gfo) sm1 where - isConcr (_,mi) = case mi of - ModMod m -> isModCnc m && mstatus m /= MSIncomplete - _ -> False + isConcr (_,m) = isModCnc m && mstatus m /= MSIncomplete && isNothing (mwith m) -compileSourceModule :: Options -> CompileEnv -> - SourceModule -> IOE (Int,SourceModule) +compileSourceModule :: Options -> CompileEnv -> SourceModule -> IOE (Int,SourceModule) compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do let putp = putPointE Normal opts @@ -191,7 +189,7 @@ compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do intermOut opts DumpExtend (prModule mo1b) case mo1b of - (_,ModMod n) | not (isCompleteModule n) -> do + (_,n) | not (isCompleteModule n) -> do return (k,mo1b) -- refresh would fail, since not renamed _ -> do mo2:_ <- putpp " renaming " $ ioeErr $ renameModule mos mo1b -- cgit v1.2.3