Skip to content

Commit d8545d4

Browse files
committed
feat: add qualifiers for Arg and Flag to disambiguate Cli.{Parsed.}Flag
Thanks to leanprover/lean4#5783, we now have recursive structure commands, which trips the inference into constructing a recursive struct. Therefore, we disambiguate the fields in `Cli.Parsed.Flag` to explicitly refer to `Cli.Flag`. Discovered when bumping toolchain to nightly in leanprover/LNSym#244.
1 parent 2cf1030 commit d8545d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Cli/Basic.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ section Configuration
340340
def isParamless (f : Flag) : Bool := f.type == Unit
341341
end Flag
342342

343+
343344
/--
344345
Represents an argument (either positional or variable),
345346
usually known as "operand" in standard terminology
@@ -360,7 +361,7 @@ section Configuration
360361
-/
361362
structure Flag where
362363
/-- Associated flag meta-data. -/
363-
flag : Flag
364+
flag : Cli.Flag
364365
/-- Parsed value that was validated and conforms to `flag.type`. -/
365366
value : String
366367
deriving Inhabited, BEq, Repr
@@ -393,7 +394,7 @@ section Configuration
393394
-/
394395
structure Arg where
395396
/-- Associated argument meta-data. -/
396-
arg : Arg
397+
arg : Cli.Arg
397398
/-- Parsed value that was validated and conforms to `arg.type`. -/
398399
value : String
399400
deriving Inhabited, BEq, Repr
@@ -1630,4 +1631,4 @@ section IO
16301631
end Cmd
16311632
end IO
16321633

1633-
end Cli
1634+
end Cli

0 commit comments

Comments
 (0)