1
0
forked from GitHub/gf-core

Move checkPredefError from GF.Compile.Compute.ConcreteLazy to GF.Grammar.Macros

Also simplified its type.
This commit is contained in:
hallgren
2013-11-29 14:43:01 +00:00
parent 1067d59609
commit 0a59f95d92
4 changed files with 9 additions and 9 deletions

View File

@@ -225,6 +225,12 @@ isPredefConstant t = case t of
Q (mod,_) | mod == cPredef || mod == cPredefAbs -> True
_ -> False
checkPredefError :: Monad m => Term -> m Term
checkPredefError t =
case t of
Error s -> fail ("Error: "++s)
_ -> return t
cnPredef :: Ident -> Term
cnPredef f = Q (cPredef,f)