summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Optimize.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2013-11-29 14:43:01 +0000
committerhallgren <hallgren@chalmers.se>2013-11-29 14:43:01 +0000
commit0a59f95d92223bae842323d582ec5d2eb3156a8d (patch)
tree9cb305da42da037dbbdbd467a2e39cbb790e63cc /src/compiler/GF/Compile/Optimize.hs
parent1067d5960964995e92209354aecb4c4ed82e9b86 (diff)
Move checkPredefError from GF.Compile.Compute.ConcreteLazy to GF.Grammar.Macros
Also simplified its type.
Diffstat (limited to 'src/compiler/GF/Compile/Optimize.hs')
-rw-r--r--src/compiler/GF/Compile/Optimize.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Compile/Optimize.hs b/src/compiler/GF/Compile/Optimize.hs
index e5289fe7b..bd75cbc2c 100644
--- a/src/compiler/GF/Compile/Optimize.hs
+++ b/src/compiler/GF/Compile/Optimize.hs
@@ -119,7 +119,7 @@ partEval opts = if flag optNewComp opts
partEvalNew opts gr (context, val) trm =
errIn (render (text "partial evaluation" <+> ppTerm Qualified 0 trm)) $
- checkPredefError gr trm
+ checkPredefError trm
partEvalOld opts gr (context, val) trm = errIn (render (text "partial evaluation" <+> ppTerm Qualified 0 trm)) $ do
let vars = map (\(bt,x,t) -> x) context
@@ -130,7 +130,7 @@ partEvalOld opts gr (context, val) trm = errIn (render (text "partial evaluation
trm3 <- if rightType trm2
then computeTerm gr subst trm2 -- compute twice??
else recordExpand val trm2 >>= computeTerm gr subst
- trm4 <- checkPredefError gr trm3
+ trm4 <- checkPredefError trm3
return $ mkAbs [(Explicit,v) | v <- vars] trm4
where
-- don't eta expand records of right length (correct by type checking)