diff options
| author | hallgren <hallgren@chalmers.se> | 2012-10-19 19:56:00 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-10-19 19:56:00 +0000 |
| commit | 1195db1da3f8e0c1b7edf39cac604b2bf8482aab (patch) | |
| tree | edc5401028e550e687fd101287790268bd95b5d5 /src/compiler/GF/Compile/Refresh.hs | |
| parent | 921b37834c66eeaba18147c5ab027b1f062b8829 (diff) | |
Consistenly use SourceGrammar instead of [SourceModule] when calling compiler passes
Diffstat (limited to 'src/compiler/GF/Compile/Refresh.hs')
| -rw-r--r-- | src/compiler/GF/Compile/Refresh.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/GF/Compile/Refresh.hs b/src/compiler/GF/Compile/Refresh.hs index b66e88aa3..edff8a479 100644 --- a/src/compiler/GF/Compile/Refresh.hs +++ b/src/compiler/GF/Compile/Refresh.hs @@ -106,15 +106,15 @@ refreshEquation pst = err Bad (return . fst) (appSTM (refr pst) initIdState) whe -- for concrete and resource in grammar, before optimizing -refreshGrammar :: SourceGrammar -> Err SourceGrammar -refreshGrammar = liftM (mGrammar . snd) . foldM refreshModule (0,[]) . modules +--refreshGrammar :: SourceGrammar -> Err SourceGrammar +--refreshGrammar = liftM (mGrammar . snd) . foldM refreshModule (0,[]) . modules -refreshModule :: (Int,[SourceModule]) -> SourceModule -> Err (Int,[SourceModule]) -refreshModule (k,ms) mi@(i,mo) +refreshModule :: (Int,SourceGrammar) -> SourceModule -> Err (Int,[SourceModule]) +refreshModule (k,sgr) mi@(i,mo) | isModCnc mo || isModRes mo = do (k',js') <- foldM refreshRes (k,[]) $ tree2list $ jments mo - return (k', (i,mo{jments=buildTree js'}) : ms) - | otherwise = return (k, mi:ms) + return (k', (i,mo{jments=buildTree js'}) : modules sgr) + | otherwise = return (k, mi:modules sgr) where refreshRes (k,cs) ci@(c,info) = case info of ResOper ptyp (Just (L loc trm)) -> do ---- refresh ptyp |
