From 6a4fdd221a25527bb86e649f7b64e12e66a1291b Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 10 Nov 2003 15:59:21 +0000 Subject: [PATCH] Improved error msg for failed glue. --- src/GF/Grammar/Compute.hs | 8 ++++++-- src/Today.hs | 2 +- 2 files changed, 7 insertions(+), 3 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." diff --git a/src/Today.hs b/src/Today.hs index a0a8c2fdc..f6bda46c7 100644 --- a/src/Today.hs +++ b/src/Today.hs @@ -1 +1 @@ -module Today where today = "Mon Nov 10 17:00:26 CET 2003" +module Today where today = "Mon Nov 10 17:40:41 CET 2003"