small things

This commit is contained in:
aarne
2004-06-18 13:14:50 +00:00
parent 1ecf09836a
commit e0d4eff9cb
4 changed files with 116 additions and 46 deletions

View File

@@ -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