This commit is contained in:
Ayaz Hafiz 2022-09-30 13:39:02 -05:00
parent 0fceb8573c
commit 3490b4b6ef
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58

View File

@ -488,7 +488,7 @@ positional : _ -> Parser Str
positional = \{ name, help ? "" } ->
fn = \args ->
nextUnmarked args
|> Result.mapErr (\OutOfBounds -> (MissingPositionalArg name))
|> Result.mapErr (\OutOfBounds -> MissingPositionalArg name)
|> Result.map (\{ val, index } -> { val, newlyTaken: Set.insert args.taken index })
@Parser (Positional { name, help } fn)