def route_found

cli@0.2.0.0 · cli.bend:4868

import cli@0.2.0.0/cli.bend as Cli
import Base

4868# No route for the path is checked first, then every key names a command.
4869def route_found(-A: Type, found: Maybe<Call(A)>, keys: List<&2, String>,
4870    cmd: Cmd, path: List<&2, String>, m: Matches) -> Dec(A):
4871  match found cmd:
4872    case None{} Cmd{name, about, items}:
4873      Fail{Bug{String.concat(["no route for '", path_text(name, path), "'"])}}
4874    case Some{call} Cmd{name, about, items}:
4875      route_call(A, non_command(keys, items), call, m)

Uses (13)

Used by (1)