Arg package:servant-foreign

Maps a name to the foreign type that belongs to the annotated value. Used for header args, query args, and capture args.
Type of a QueryArg.
The name of the header and the foreign type of its value.
Url Query argument. Urls can contain query arguments, which is a list of key-value pairs. In a typical url, query arguments look like this:
?foo=bar&alist[]=el1&alist[]=el2&aflag
Each pair can be
  • ?foo=bar: a plain key-val pair, either optional or required (QueryParam)
  • ?aflag: a flag (no value, implicitly Bool with default false if it’s missing) (QueryFlag)
  • ?alist[]=el1&alist[]=el2: list of values (QueryParams)
_queryArgType will be set accordingly. For the plain key-val pairs (QueryParam), _queryArgName’s ftype will be wrapped in a Maybe if the argument is optional.
Unused, will never be set. TODO: remove
The name to be captured. Only for capture args it really denotes a path segment.
Foreign type the associated value will have
Name and foreign type of the argument. Will be wrapped in Maybe if the query is optional and in a `[]` if the query is a list
one of normal/plain, list or flag
Crashing Arg extraction from segment, TODO: remove