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.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/GF/Shell.hs b/src/GF/Shell.hs
index e00382bff..014f5bd60 100644
--- a/src/GF/Shell.hs
+++ b/src/GF/Shell.hs
@@ -128,7 +128,12 @@ execC co@(comm, opts0) sa@((st,(h,_)),a) = checkOptions st co >> case comm of
ASTrm _ -> s2t a
_ -> a
case a' of
- ATrms (trm:_) -> do
+ ATrms (trm:_) -> case tree2exp trm of
+ G.EInt _ -> do
+ putStrLn "Warning: Number argument deprecated, use gr -number=n instead"
+ ts <- randomTreesIO opts gro (optIntOrN opts flagNumber 1)
+ returnArg (ATrms ts) sa
+ _ -> do
g <- newStdGen
case (goFirstMeta (tree2loc trm) >>= refineRandom g 41 cgr) of
Ok trm' -> returnArg (ATrms [loc2tree trm']) sa