21 | %hide Data.List.Alternating.infixl.(+>)
22 | %hide Data.String.Extra.infixl.(+>)
23 | %hide Data.List.Alternating.infixr.(<+)
24 | %hide Data.String.Extra.infixr.(<+)
25 | -- The CLI API takes a list of strings as input for the list
26 | -- of command-line arguments, and returns a string as output
31 | -- Executes the given action in io
32 | export
36 | -- Executes the given CLI operation from a costate
37 | export
78 | export
93 | -- a string that identifies the command when debugging incorrect parsing
113 | parserFromFullFlag (MkFlag {prefix_ = Just x} fullFlag) = string x *> space *> parserFromAbirvFlag fullFlag
125 | }
148 | fromGeneric : {0 xs : List1 Type} -> All (\x => x) xs -> (cmds : All ToCommand xs) => List1 GenericCommand
186 | export
192 | export
195 | let input = concat (intersperse " " $ drop 1 strs) -- combine the list of args into one string
197 | in trace "parsing: \{input}" $ eitherToMaybe (map fst parser) -- drop the Int counting how deep we are in the string
199 | %unbound_implicits off
206 | export
213 | export
221 | export
230 | where
245 | export