Module
Payload.Internal.QueryParsing
- Package
- purescript-payload
- Repository
- hoodunit/purescript-payload
#asSegments Source
asSegments :: forall urlStr urlParts. ParseQuery urlStr urlParts => ToSegments urlParts => Proxy urlStr -> List Segment
#ToSegments Source
class ToSegments (urlParts :: QueryList) where
Members
toSegments :: QueryListProxy urlParts -> List Segment -> List Segment
Instances
ToSegments QueryNil
(IsSymbol name, IsSymbol key, ToSegments rest) => ToSegments (QueryCons (Key name key) rest)
(IsSymbol multi, ToSegments rest) => ToSegments (QueryCons (Multi multi) rest)
#QueryParseFail Source
data QueryParseFail :: QueryList
Instances
(ParseError u "" "Trailing & - query params cannot end with trailing &" doc) => Match u "&" "" acc acc2 any QueryParseFail
(ParseError u "" "Empty query string - there were no query parameters following \'?\'" doc) => Match u "?" "" acc acc2 "start" QueryParseFail
(Cons x xs fullUrl, ParseError u xs "Missing ? - query segments must start with ? and be separated by &" doc) => Match u x xs acc acc2 "start" QueryParseFail
(ParseError u xs "multi-segment query matches must have a name" doc) => Match u ">" xs "" acc2 "multi" QueryParseFail
(ParseError u xs "multi-segment query match must be the final component of a path" doc) => Match u ">" xs acc acc2 "multi" QueryParseFail
(ParseError u "" "multi-segment query match was not closed" doc) => Match u x "" acc acc2 "multi" QueryParseFail
(ParseError u xs "tags cannot be nested in multi-segment query matches" doc) => Match u "<" xs acc acc2 "multi" QueryParseFail
(ParseError u xs "query param key name must start with opening \'<\', e.g. limit=<limit>" doc) => Match u x xs acc "" "keyEquals" QueryParseFail
(ParseError u xs "query param matches must have a name" doc) => Match u ">" xs acc "" "key" QueryParseFail
(Append acc x key, ParseError u "" "key tag was not closed" doc) => Match u x "" acc acc2 "key" QueryParseFail
(ParseError u xs "key tags cannot be nested" doc) => Match u "<" xs acc acc2 "key" QueryParseFail
(ParseError u xs "expected \'&\' between query parts" doc) => Match u x xs name key "ampersand" QueryParseFail
(ParseError u xs "saw closing \'>\' for key without opening \'<\'" doc) => Match u ">" xs acc acc2 mode QueryParseFail
(ParseError u xs "saw key name without query param name - query params should be of form name=<keyName>" doc) => Match u "<" xs acc acc2 any QueryParseFail
(ParseError u xs "saw & before query param name - query params should be of form name=<keyName>" doc) => Match u "&" xs acc "" "lit" QueryParseFail
(ParseError u "" "query string ended before query param name - query params should be of form name=<keyName>" doc) => Match u x "" acc "" "lit" QueryParseFail
#QueryCons Source
data QueryCons :: QueryPart -> QueryList -> QueryList
Instances
(IsSymbol name, IsSymbol key, ToSegments rest) => ToSegments (QueryCons (Key name key) rest)
(IsSymbol multi, ToSegments rest) => ToSegments (QueryCons (Multi multi) rest)
Match u ">" "" acc acc2 "multi" (QueryCons (Multi acc) QueryNil)
Match u ">" "" name key "key" (QueryCons (Key name key) QueryNil)
(Cons y ys xs, Match u y ys "" "" "ampersand" rest) => Match u ">" xs name key "key" (QueryCons (Key name key) rest)
#ParseQuery Source
class ParseQuery (string :: Symbol) (parts :: QueryList) | string -> parts
Instances
ParseQuery "" QueryNil
(Cons h t string, Match string h t "" "" "start" fl) => ParseQuery string fl
#Match Source
class Match (url :: Symbol) (head :: Symbol) (tail :: Symbol) (acc :: Symbol) (acc2 :: Symbol) (mode :: Symbol) (out :: QueryList) | head tail acc mode -> out
Instances
(ParseError u "" "Trailing & - query params cannot end with trailing &" doc) => Match u "&" "" acc acc2 any QueryParseFail
(ParseError u "" "Empty query string - there were no query parameters following \'?\'" doc) => Match u "?" "" acc acc2 "start" QueryParseFail
(Cons y ys xs, Match u y ys "" "" "any" rest) => Match u "?" xs acc acc2 "start" rest
Match u x "" "" acc2 "start" QueryNil
(Cons y ys xs, Match u y ys "" "" "start" rest) => Match u x xs "" "" "start" rest
(Cons x xs fullUrl, ParseError u xs "Missing ? - query segments must start with ? and be separated by &" doc) => Match u x xs acc acc2 "start" QueryParseFail
(Cons y ys xs, Match u y ys "" "" "any" rest) => Match u "&" xs acc acc2 "any" rest
(Cons "." ys xs, Cons "." zs ys, Cons q qs zs, Match u q qs "" "" "multi" rest) => Match u "<" xs acc acc2 "any" rest
(ParseError u xs "multi-segment query matches must have a name" doc) => Match u ">" xs "" acc2 "multi" QueryParseFail
Match u ">" "" acc acc2 "multi" (QueryCons (Multi acc) QueryNil)
(ParseError u xs "multi-segment query match must be the final component of a path" doc) => Match u ">" xs acc acc2 "multi" QueryParseFail
(ParseError u "" "multi-segment query match was not closed" doc) => Match u x "" acc acc2 "multi" QueryParseFail
(ParseError u xs "tags cannot be nested in multi-segment query matches" doc) => Match u "<" xs acc acc2 "multi" QueryParseFail
(Cons y ys xs, Append acc x newAcc, Match u y ys newAcc "" "multi" rest) => Match u x xs acc "" "multi" rest
(Cons y ys xs, Match u y ys acc "" "key" rest) => Match u "<" xs acc "" "keyEquals" rest
(ParseError u xs "query param key name must start with opening \'<\', e.g. limit=<limit>" doc) => Match u x xs acc "" "keyEquals" QueryParseFail
(Cons "." ys xs, Cons z zs ys, Match u z zs "" acc2 "multi" rest) => Match u "." xs "" acc2 "key" rest
(ParseError u xs "query param matches must have a name" doc) => Match u ">" xs acc "" "key" QueryParseFail
Match u ">" "" name key "key" (QueryCons (Key name key) QueryNil)
(Cons y ys xs, Match u y ys "" "" "ampersand" rest) => Match u ">" xs name key "key" (QueryCons (Key name key) rest)
(Append acc x key, ParseError u "" "key tag was not closed" doc) => Match u x "" acc acc2 "key" QueryParseFail
(ParseError u xs "key tags cannot be nested" doc) => Match u "<" xs acc acc2 "key" QueryParseFail
(Cons y ys xs, Append acc2 x newAcc2, Match u y ys acc newAcc2 "key" rest) => Match u x xs acc acc2 "key" rest
(Cons y ys xs, Match u y ys "" "" "any" rest) => Match u "&" xs name key "ampersand" rest
(ParseError u xs "expected \'&\' between query parts" doc) => Match u x xs name key "ampersand" QueryParseFail
(Cons y ys xs, Match u y ys acc "" "keyEquals" rest) => Match u "=" xs acc "" "lit" rest
(ParseError u xs "saw closing \'>\' for key without opening \'<\'" doc) => Match u ">" xs acc acc2 mode QueryParseFail
(ParseError u xs "saw key name without query param name - query params should be of form name=<keyName>" doc) => Match u "<" xs acc acc2 any QueryParseFail
(Cons y ys xs, Match u y ys x "" "lit" rest) => Match u x xs "" "" "any" rest
(ParseError u xs "saw & before query param name - query params should be of form name=<keyName>" doc) => Match u "&" xs acc "" "lit" QueryParseFail
(ParseError u "" "query string ended before query param name - query params should be of form name=<keyName>" doc) => Match u x "" acc "" "lit" QueryParseFail
(Cons y ys xs, Append acc x newAcc, Match u y ys newAcc "" "lit" rest) => Match u x xs acc "" "lit" rest
(Fail (Beside (Text "Failed parsing URL at: \'") (Beside (Text h) (Beside (Text "\':\'") (Beside (Text t) (Beside (Text "\' (acc: \'") (Beside (Text acc) (Beside (Text "\', acc2: \'") (Beside (Text acc2) (Beside (Text "\', mode: ") (Beside (Text mode) (Text ")")))))))))))) => Match u h t acc acc2 mode rest
- Modules
- Payload.
Client - Payload.
Client. ClientApi - Payload.
Client. DecodeResponse - Payload.
Client. EncodeBody - Payload.
Client. EncodeParam - Payload.
Client. Internal. EncodeUri - Payload.
Client. Internal. Query - Payload.
Client. Internal. Url - Payload.
Client. Options - Payload.
Client. QueryParams - Payload.
Client. Queryable - Payload.
Client. Response - Payload.
ContentType - Payload.
Debug - Payload.
Headers - Payload.
Internal. QueryParsing - Payload.
Internal. Route - Payload.
Internal. UrlParsing - Payload.
Internal. Utils - Payload.
ResponseTypes - Payload.
Server - Payload.
Server. Cookies - Payload.
Server. DecodeBody - Payload.
Server. Guards - Payload.
Server. Handleable - Payload.
Server. Handlers - Payload.
Server. Internal. GuardParsing - Payload.
Server. Internal. MimeTypes - Payload.
Server. Internal. OmitEmpty - Payload.
Server. Internal. Query - Payload.
Server. Internal. Querystring - Payload.
Server. Internal. Request - Payload.
Server. Internal. ServerResponse - Payload.
Server. Internal. Trie - Payload.
Server. Internal. Url - Payload.
Server. Internal. UrlString - Payload.
Server. Params - Payload.
Server. Path - Payload.
Server. QueryParams - Payload.
Server. Response - Payload.
Server. Routable - Payload.
Server. Status - Payload.
Spec - Payload.
TypeErrors