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/Refresh.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/GF/Compile/Refresh.hs') diff --git a/src/GF/Compile/Refresh.hs b/src/GF/Compile/Refresh.hs index 39fb57db0..d446008d0 100644 --- a/src/GF/Compile/Refresh.hs +++ b/src/GF/Compile/Refresh.hs @@ -109,11 +109,11 @@ refreshGrammar :: SourceGrammar -> Err SourceGrammar refreshGrammar = liftM (MGrammar . snd) . foldM refreshModule (0,[]) . modules refreshModule :: (Int,[SourceModule]) -> SourceModule -> Err (Int,[SourceModule]) -refreshModule (k,ms) mi@(i,m) = case m of - ModMod mo | (isModCnc mo || isModRes mo) -> do +refreshModule (k,ms) mi@(i,mo) + | isModCnc mo || isModRes mo = do (k',js') <- foldM refreshRes (k,[]) $ tree2list $ jments mo - return (k', (i, ModMod(replaceJudgements mo (buildTree js'))) : ms) - _ -> return (k, mi:ms) + return (k', (i, replaceJudgements mo (buildTree js')) : ms) + | otherwise = return (k, mi:ms) where refreshRes (k,cs) ci@(c,info) = case info of ResOper ptyp (Yes trm) -> do ---- refresh ptyp -- cgit v1.2.3