mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-05 01:02:51 -06:00
Predef.error surfaces as error message in compilation and cc command
This commit is contained in:
@@ -112,7 +112,8 @@ partEval opts gr (context, val) trm = errIn (render (text "partial evaluation" <
|
||||
trm3 <- if rightType trm2
|
||||
then computeTerm gr subst trm2
|
||||
else recordExpand val trm2 >>= computeTerm gr subst
|
||||
return $ mkAbs [(Explicit,v) | v <- vars] trm3
|
||||
trm4 <- checkPredefError gr trm3
|
||||
return $ mkAbs [(Explicit,v) | v <- vars] trm4
|
||||
where
|
||||
-- don't eta expand records of right length (correct by type checking)
|
||||
rightType (R rs) = case val of
|
||||
@@ -199,3 +200,4 @@ replace old new trm =
|
||||
R _ | trm == old -> new
|
||||
App x y -> App (replace old new x) (replace old new y)
|
||||
_ -> composSafeOp (replace old new) trm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user