Open hagl opened 2 years ago
same problem here
main : '{IO, Exception} ()
main _ = let
use Text ++
printLine "Hello world"
args = !getArgs
List.foldLeft
(i arg -> let
printLine (toText i ++ ": " ++ arg)
i + 1) 0 args
()
$ ucm
.> find
# exit find
.> run main 0 1
Hello world
0: 0
1: add_mul#bl5qhvd4r9qdnm01vhksm6ekve2l1ibbp36p5qjeq8bsh0cokkepl22otlhp5f982a410u08714j7jse5lkontk97c9q9il53ct7nh8
Can we change it from a pre-step to a per-argument thing, have it be part of the argumentType
? IIRC we want substitution for everything except args 2+ when running.
Even a workaround like clearing the numbered args would be better than nothing.
When running a main function in
ucm
a numeric argument is replaced by the potential last result of a find command:See this discussion on Slack: https://unisonlanguage.slack.com/archives/CLUNF0J5S/p1642108647023800