| 702 | // ============================================================================= |
| 703 | |
| 704 | const allTupled = <const T extends ArrayLike<Options.Options<any>>>(arg: T): Options.Options< |
| 705 | { |
| 706 | [K in keyof T]: [T[K]] extends [Options.Options<infer A>] ? A : never |
| 707 | } |
| 708 | > => { |
| 709 | if (arg.length === 0) { |
| 710 | return none as any |
| 711 | } |
| 712 | if (arg.length === 1) { |
| 713 | return map(arg[0], (x) => [x]) as any |
| 714 | } |
| 715 | let result = map(arg[0], (x) => [x]) |
| 716 | for (let i = 1; i < arg.length; i++) { |
| 717 | const curr = arg[i] |
| 718 | result = map(makeBoth(result, curr), ([a, b]) => [...a, b]) |
| 719 | } |
| 720 | return result as any |
| 721 | } |
| 722 | |
| 723 | const getHelpInternal = (self: Instruction): HelpDoc.HelpDoc => { |
| 724 | switch (self._tag) { |