mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 22:42:52 -06:00
Move checkPredefError from GF.Compile.Compute.ConcreteLazy to GF.Grammar.Macros
Also simplified its type.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user