mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-09 03:02:50 -06:00
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