rseq -package:parallel

Push an outer layer of interpretation functor into each named field.
Push an outer layer of interpretation functor into each field.
Split out the query string into a list of keys and values. A few importants points:
  • The result returned is still bytestrings, since we perform no character decoding here. Most likely, you will want to use UTF-8 decoding, but this is left to the user of the library.
  • Percent decoding errors are ignored. In particular, "%Q" will be output as "%Q".
  • It decodes '+' characters to ' '
Same functionality as parseQuery, but with the option to decode '+' characters to ' ' or to preserve any '+' encountered. If you want to replace any '+' with a space, use True.
Parse a QueryText from a ByteString. See parseQuery for details.
queryToQueryText . parseQuery
Parse query param value.
sequentially consistent
Only to be used on header's values which support quality value syntax A few things to keep in mind when using this function: * The resulting Int will be anywhere from 1000 to 0 ("1" = 1000, "0.6" = 600, "0.025" = 25) * The absence of a Q value will result in 'Just 1000' * A bad parse of the Q value will result in a Nothing, e.g. * Q value has more than 3 digits behind the dot * Q value is missing * Q value is higher than 1 * Q value is not a number
Parse query param value in a Maybe.
>>> parseQueryParamMaybe "true" :: Maybe Bool
Just True
Case insensitive. Parse given text case insensitive and then parse the rest of the input using parseQueryParam.
>>> parseQueryParamWithPrefix "z" "z10" :: Either Text Int
Right 10
Parse multiple query parameters.
>>> parseQueryParams ["1", "2", "3"] :: Either Text [Int]
Right [1,2,3]

>>> parseQueryParams ["64", "128", "256"] :: Either Text [Word8]
Left "out of bounds: `256' (should be between 0 and 255)"
Parses a full Accept header into a list of quality-valued media types.
The default sequence of colours to use when plotings different data sets in a graph.
Parse an xsd:all, xsd:choice, or xsd:sequence decl.
Definition:
>>> parSequence modifier = Stream.parMapM modifier id
Useful idioms:
>>> parFromListM = Stream.parSequence id . Stream.fromList

>>> parFromFoldableM = Stream.parSequence id . StreamK.toStream . StreamK.fromFoldable
Parses a query into an intermediate format which is easy to feed to HXT
  • The top-level lists represent the top level comma separated queries.
  • SelectorGroup is a group of qualifiers which are separated with spaces or > like these three: table.main.odd tr.even > td.big
  • A SelectorGroup as a list of Selector items, following the above example the selectors in the group are: table, .main and .odd
A version of parseQueryList which acts on a single Text of space-separated terms. The usual shell quoting rules are assumed. When a pattern contains whitespace, it (or the whole term including prefix) should be enclosed in single or double quotes. A query term is either:
  1. a search pattern, which matches on one or more fields, eg:acct:REGEXP - match the account name with a regular expression desc:REGEXP - match the transaction description date:PERIODEXP - match the date with a period expression
The prefix indicates the field to match, or if there is no prefix account name is assumed.
  1. a query option, which modifies the reporting behaviour in some way. There is currently one of these, which may appear only once:inacct:FULLACCTNAME
Period expressions may contain relative dates, so a reference date is required to fully parse these.
>>> parseQuery nulldate "expenses:dining out"
Right (Or [Acct (RegexpCI "expenses:dining"),Acct (RegexpCI "out")],[])
>>> parseQuery nulldate "\"expenses:dining out\""
Right (Acct (RegexpCI "expenses:dining out"),[])
Convert a list of space-separated queries to a single query Multiple terms are combined as follows: 1. multiple account patterns are OR'd together 2. multiple description patterns are OR'd together 3. multiple status patterns are OR'd together 4. then all terms are AND'd together