def check_choices
import cli@0.2.0.0/cli.bend as Cliimport Base
2140# Parse checks a value's type before its choices, so a choice the type
2141# rejects could never be given.
2142def check_choices(found: Maybe<&2, List<&2, String>>,
2143 kind: Maybe<&2, ValueType>, id: String, at: String) -> List<&2, Problem>:
2144 match found:
2145 case None{}: Nil{}
2146 case Some{values}: bad_choice(choice_bad(values, kind, None{}), id, at)