summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Compute.hs
diff options
context:
space:
mode:
authoraarne <unknown>2003-11-10 15:59:21 +0000
committeraarne <unknown>2003-11-10 15:59:21 +0000
commit6a4fdd221a25527bb86e649f7b64e12e66a1291b (patch)
tree403591a5152b6f00420f69e93ef7e729c409864c /src/GF/Grammar/Compute.hs
parente470c6281fc2ee7f53fa0ae41d76c30bb52b0f0b (diff)
Improved error msg for failed glue.
Diffstat (limited to 'src/GF/Grammar/Compute.hs')
-rw-r--r--src/GF/Grammar/Compute.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/GF/Grammar/Compute.hs b/src/GF/Grammar/Compute.hs
index 5bcc5dd1e..705b81ded 100644
--- a/src/GF/Grammar/Compute.hs
+++ b/src/GF/Grammar/Compute.hs
@@ -238,6 +238,10 @@ computeTerm gr = comp where
checkNoArgVars :: Term -> Err Term
checkNoArgVars t = case t of
- Vr (IA _) -> prtBad "cannot glue (+) term with run-time variable" t
- Vr (IAV _) -> prtBad "cannot glue (+) term with run-time variable" t
+ Vr (IA _) -> Bad $ glueErrorMsg $ prt t
+ Vr (IAV _) -> Bad $ glueErrorMsg $ prt t
_ -> composOp checkNoArgVars t
+
+glueErrorMsg s =
+ "Cannot glue (+) term with run-time variable" +++ s ++ "." ++++
+ "Use Prelude.bind instead."