From 26b03cef106c399f6417d9157466dee139c54c5a Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 13 Apr 2004 11:55:52 +0000 Subject: error msg for term input --- src/GF/Shell.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GF/Shell.hs') diff --git a/src/GF/Shell.hs b/src/GF/Shell.hs index 7574b86a6..4c2a067a4 100644 --- a/src/GF/Shell.hs +++ b/src/GF/Shell.hs @@ -293,8 +293,10 @@ opST2CommandArg f = err AError ATrms . f . prCommandArg opTS2CommandArg :: (Tree -> String) -> CommandArg -> CommandArg opTS2CommandArg f (ATrms ts) = AString $ unlines $ map f ts -opTS2CommandArg _ _ = AError ("expected term") +opTS2CommandArg _ (AError s) = AError ("expected term, but got error:" ++++ s) +opTS2CommandArg _ a = AError ("expected term, but got:" ++++ prCommandArg a) opTT2CommandArg :: (Tree -> [Tree]) -> CommandArg -> CommandArg opTT2CommandArg f (ATrms ts) = ATrms $ concat $ map f ts -opTT2CommandArg _ _ = AError ("expected term") +opTT2CommandArg _ (AError s) = AError ("expected term, but got error:" ++++ s) +opTT2CommandArg _ a = AError ("expected term, but got:" ++++ prCommandArg a) -- cgit v1.2.3