diff options
| author | hallgren <hallgren@chalmers.se> | 2012-12-11 15:37:41 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-12-11 15:37:41 +0000 |
| commit | 5e091d2e3dc428daa1d4b0d8df6e7b613adc22a9 (patch) | |
| tree | 5c2c62eabdeab22d443cca85b9d7b48aec436c19 /src/compiler/GFI.hs | |
| parent | 2623925e67b240f289b7ca507dd9c1ae194a93ce (diff) | |
partial evaluator work
* Evaluate operators once, not every time they are looked up
* Remember the list of parameter values instead of recomputing it from the
pattern type every time a table selection is made.
* Quick fix for partial application of some predefined functions.
Diffstat (limited to 'src/compiler/GFI.hs')
| -rw-r--r-- | src/compiler/GFI.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GFI.hs b/src/compiler/GFI.hs index 980264042..55256c3d7 100644 --- a/src/compiler/GFI.hs +++ b/src/compiler/GFI.hs @@ -18,7 +18,7 @@ import GF.Grammar.ShowTerm import GF.Grammar.Lookup (allOpers,allOpersTo) import GF.Compile.Rename(renameSourceTerm) import GF.Compile.Compute.Concrete (computeConcrete,checkPredefError) -import qualified GF.Compile.Compute.ConcreteNew as CN(normalForm) +import qualified GF.Compile.Compute.ConcreteNew as CN(normalForm,resourceValues) import GF.Compile.TypeCheck.Concrete (inferLType,ppType) import GF.Infra.Dependencies(depGraph) import GF.Infra.CheckM @@ -333,7 +333,7 @@ checkComputeTerm' new sgr t = do ((t,_),_) <- runCheck $ do t <- renameSourceTerm sgr mo t inferLType sgr [] t t1 <- if new - then return (CN.normalForm sgr t) + then return (CN.normalForm (CN.resourceValues sgr) t) else computeConcrete sgr t checkPredefError sgr t1 |
