def reads.arg
import shake@0.7.0.0/src/check.bend as Checkimport Base
import shake@0.7.0.0/src/cli.bend as C
252# a read of the argument found under its name, or of none
253def reads.arg(found: Maybe<&2, C.Arg>, want: Want, +path: List<&2, String>, +name: String) -> List<&2, ReadErr>:
254 match found:
255 case None{}:
256 [NoArg{path, name}]
257 case Some{aa}:
258 C.Arg{_n, _s, _l, kind, _h, _r, _d, _c} = aa
259 reads.want(want, reads.flag(kind), path, name)