search

Combinator for the <search> element. Example:
search $ span $ toHtml "foo"
Result:
<search><span>foo</span></search>
Given a ByteString to look for (the "needle") and an InputStream, produces a new InputStream which yields data of type MatchInfo. Example:
ghci> fromList ["food", "oof", "oodles", "ok"] >>=
search "foo" >>= toList
[Match "foo",NoMatch "d",NoMatch "oo",Match "foo",NoMatch "dlesok"]
Uses the Boyer-Moore-Horspool algorithm (http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm).
O(log(min(i,n-i))). Search a sequence for a point where a predicate on splits of the sequence changes from False to True. The argument p is a relation between the measures of the two sequences that could be appended together to form the sequence t. If the relation is False at the leftmost split and True at the rightmost split, i.e.
not (p mempty (measure t)) && p (measure t) mempty
then there must exist an element x in the sequence such that p is False for the split immediately before x and True for the split just after it: In this situation, search p t returns such an element x and the pieces l and r of the sequence to its left and right respectively. That is, it returns Position l x r such that
  • l >< (x <| r) = t
  • not (p (measure l) (measure (x <| r))
  • p (measure (l |> x)) (measure r)
For predictable results, one should ensure that there is only one such point, i.e. that the predicate is monotonic on t.
O(k log (n/k)). All intervals that contain the given point, in lexicographical order.
Search for a query on Hoogle. Return all search results.
Search for a key in the current context. The search is conducted inside out mening the current focus is searched first. If the key is not found the outer scopes are recursively searched until the key is found, then innerSearch is called on the result.
Iteratively search at increasing depths of button-presses to see if we can transform from the initial board position to a final board position.
Search the database using case insensitive matching.
Like find but with case insensitive matching.
Given a browser, a search engine's transformation function, and a search term, perform the requested search in the browser.
Perform search over pure predicates. The monadic version of this is searchM.
O(log(abs n)). Search a bounded integral type. If p is an upward-closed predicate, search p returns Just n if and only if n is the least such satisfying p.
O(log(abs n)). Search the integers. If p is an upward-closed predicate, search p returns the least n satisfying p. If no such n exists, either because no integer satisfies p or all do, search p does not terminate. For example, the following function computes discrete logarithms (base 2):
discreteLog :: Integer -> Integer
discreteLog n = search (\ k -> 2^k <= n)
Assuming p . f is satisfied only for positive values in some interval (0, r], find f r.
The deciding/searching function for Searchable p. Because this is ambiguously typed, it must be called by applying the ParamPred:
search @p
See searchTC and SearchableTC for a version that isn't ambiguously typed, but only works when p is a type constructor.
Not on Stackage, so not searched. Infinite search in finite time with Hilbert's epsilon
Start the search for partitions on a certain search state. This can be an initState or the result of performing some search steps. In the examples we use this for parallelization: We perform some steps manually and then run search on the results in parallel.