summaryrefslogtreecommitdiff
path: root/src/GF/Shell.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Shell.hs')
-rw-r--r--src/GF/Shell.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GF/Shell.hs b/src/GF/Shell.hs
index 3af343bb2..bdbf6d62c 100644
--- a/src/GF/Shell.hs
+++ b/src/GF/Shell.hs
@@ -249,6 +249,10 @@ execC co@(comm, opts0) sa@(sh@(st,(h,_,_,_)),a) = checkOptions st co >> case com
let p = optParseArgErrMsg opts gro x
case p of
Ok (ts,msg)
+ | oElem (iOpt "fail") opts && null ts -> do
+ putStrLnFlush ("#FAIL:" +++ x) >> changeArg (const $ ATrms ts) sa
+ | oElem (iOpt "ambiguous") opts && length ts > 1 -> do
+ putStrLnFlush ("#AMBIGUOUS:" +++ x) >> changeArg (const $ ATrms ts) sa
| oElem (iOpt "prob") opts -> do
let probs = stateProbs gro
let tps = rankByScore [(t,computeProbTree probs t) | t <- ts]