summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/GeneratePMCFG.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-12-05 12:42:17 +0000
committerhallgren <hallgren@chalmers.se>2014-12-05 12:42:17 +0000
commitfc46db8c7f98dd51020ef765c98e12d1e450b5e6 (patch)
treea369394df949725ff3777599f436d28891a7b814 /src/compiler/GF/Compile/GeneratePMCFG.hs
parentf600cf35e8f0907bbad26f6f54f064e17053061b (diff)
Eliminate the record extension operator from the Value type returned by the partial evaluator
It was used only in cases where a lock field needed to be added to a run-time variable, like e.g. in examples/phrasebook/SentencesTha.gf: lin PGreetingMale g = mkText (lin Text g) (lin Text (ss "ครับ")) | g ; PGreetingFemale g = mkText (lin Text g) (lin Text (ss "ค่ะ")) | g ; But lock fields are only meaningful during type checking and can safely be ignored in later passes.
Diffstat (limited to 'src/compiler/GF/Compile/GeneratePMCFG.hs')
-rw-r--r--src/compiler/GF/Compile/GeneratePMCFG.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs
index bd7d4af6b..0dfcfcc09 100644
--- a/src/compiler/GF/Compile/GeneratePMCFG.hs
+++ b/src/compiler/GF/Compile/GeneratePMCFG.hs
@@ -23,7 +23,7 @@ import GF.Grammar.Predef
import GF.Grammar.Lockfield (isLockLabel)
import GF.Data.BacktrackM
import GF.Data.Operations
-import GF.Infra.UseIO (IOE,ePutStr,ePutStrLn)
+import GF.Infra.UseIO (ePutStr,ePutStrLn) -- IOE,
import GF.Data.Utilities (updateNthM) --updateNth
import GF.Compile.Compute.ConcreteNew(GlobalEnv,normalForm,resourceValues)
import qualified Data.Map as Map
@@ -445,7 +445,7 @@ convertTerm opts sel ctype (Q (m,f))
f == cSOFT_BIND = return (CStr [SymSOFT_BIND])
| m == cPredef &&
f == cCAPIT = return (CStr [SymCAPIT])
-
+{-
convertTerm opts sel@(CProj l _) ctype (ExtR t1 t2@(R rs2))
| l `elem` map fst rs2 = convertTerm opts sel ctype t2
| otherwise = convertTerm opts sel ctype t1
@@ -453,7 +453,7 @@ convertTerm opts sel@(CProj l _) ctype (ExtR t1 t2@(R rs2))
convertTerm opts sel@(CProj l _) ctype (ExtR t1@(R rs1) t2)
| l `elem` map fst rs1 = convertTerm opts sel ctype t1
| otherwise = convertTerm opts sel ctype t2
-
+-}
convertTerm opts CNil ctype t = do v <- evalTerm CNil t
return (CPar v)
convertTerm _ sel _ t = ppbug ("convertTerm" <+> sep [parens (show sel),ppU 10 t])