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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user