diff options
| author | hallgren <hallgren@chalmers.se> | 2013-09-10 13:43:59 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2013-09-10 13:43:59 +0000 |
| commit | aa9280b2870e4e60280327dfd8a493d2b83f69ba (patch) | |
| tree | 47a22152e01fe8b3b80a53a5b040be22368270ee /src/compiler | |
| parent | b93f81705874b832f41eff3a392a2302ed9980bb (diff) | |
Workaround for a problem with lock fields
This problem showed up after delaing eta expansion until just before partial
evaluation
Diffstat (limited to 'src/compiler')
| -rw-r--r-- | src/compiler/GF/Compile/GeneratePMCFG.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index 698bf3d5c..8ff42f6ef 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -20,6 +20,7 @@ import GF.Infra.Option import GF.Grammar hiding (Env, mkRecord, mkTable) import GF.Grammar.Lookup import GF.Grammar.Predef +import GF.Grammar.Lockfield (isLockLabel) import GF.Data.BacktrackM import GF.Data.Operations import GF.Infra.UseIO (IOE) @@ -438,7 +439,8 @@ convertArg opts ty nr path = do return (CPar value) convertRec opts CNil (RecType rs) record = - mkRecord (map (\(lbl,ctype) -> (lbl,convertTerm opts CNil ctype (projectRec lbl record))) rs) + mkRecord [(lbl,convertTerm opts CNil ctype (proj lbl))|(lbl,ctype)<-rs] + where proj lbl = if isLockLabel lbl then R [] else projectRec lbl record convertRec opts (CProj lbl path) ctype record = convertTerm opts path ctype (projectRec lbl record) convertRec opts _ ctype _ = bug ("convertRec: "++show ctype) |
