def fmt.ext
import cswap-bend-cli@0.1.0.0/setimp.bend as Setimpimport Base
61def fmt.ext(m: Maybe<&2, String>, +path: String) -> Result<&2, &2, String, String>:
62 match m:
63 case Some{f}:
64 Done{f}
65 case None{}:
66 Fail{"cannot tell the format of '" ++ path ++ "' from its extension; pass --format json|yaml|toon|csv"}