diff options
| author | hallgren <hallgren@chalmers.se> | 2014-05-16 14:10:07 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-05-16 14:10:07 +0000 |
| commit | 307795f3853b7b5772ff0c190e7e054ac64bd777 (patch) | |
| tree | 7db332694288c1352b4b4832f395633d7a6fcf71 | |
| parent | e9b5b8b09492808de625ebaa8abd8e940918d8d5 (diff) | |
Fix an eta expansion bug in the grammar compiler
Eta expansion is applied between partial evaluation and PMCFG generation.
The buggy version generated type incorrect terms, but PMCFG generation
apparently worked anyway.
| -rw-r--r-- | src/compiler/GF/Compile/GeneratePMCFG.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index 6eaaa9bff..5a3f01c86 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -154,9 +154,7 @@ convert opts gr cenv loc term ty@(_,val) pargs = then-} normalForm cenv loc (expand ty term) -- new evaluator --else term -- old evaluator is invoked from GF.Compile.Optimize -expand ty@(context,val) = recordExpand val . etaExpand ty - -etaExpand (context,val) = mkAbs pars . flip mkApp args +expand (context,val) = mkAbs pars . recordExpand val . flip mkApp args where pars = [(Explicit,v) | v <- vars] args = map Vr vars vars = map (\(bt,x,t) -> x) context |
