1
0
forked from GitHub/gf-core

Improved interface and instance compilation.

Improved interface and instance compilation.
Restored an optimization of the optimizer: up to 4x faster now.
This commit is contained in:
aarne
2003-11-13 16:02:25 +00:00
parent 25c8690586
commit c5146d0614
6 changed files with 20 additions and 8 deletions

View File

@@ -86,7 +86,7 @@ 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@(Module mt fs st me ops js) | (isModCnc mo || mt == MTResource) -> do
ModMod mo@(Module mt fs st me ops js) | (isModCnc mo || isModRes mo) -> do
(k',js') <- foldM refreshRes (k,[]) $ tree2list js
return (k', (i, ModMod(Module mt fs st me ops (buildTree js'))) : ms)
_ -> return (k, mi:ms)