|
|
|
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
This is similar to the JSON library Result type - very similar,
but we want to use it in multiple places, so we abstract it into a
mini-library here.
The failure value for this monad is simply a string.
| Constructors | |
|
|
|
Simple checker for whether a Result is OK.
|
|
|
Simple checker for whether a Result is a failure.
|
|
|
Converter from Either String to Result.
|
|
|
Annotate a Result with an ownership information.
|
|
|
Annotates and transforms IOErrors into a Result type. This can be
used in the error handler argument to catch, for example.
|
|
Misc functionality
|
|
|
:: | | => a | list of "condition, result"
| -> [(Bool, a)] | first result which has a True condition, or default
| -> a | | Return the first result with a True condition, or the default otherwise.
|
|
|
Lookup of partial names functionality
|
|
|
The priority of a match in a lookup result.
| Constructors | ExactMatch | | MultipleMatch | | PartialMatch | | FailMatch | |
|
|
|
|
The result of a name lookup in a list.
| Constructors | LookupResult | | lrMatchPriority :: MatchPriority | The result type
| Matching value (for ExactMatch, PartialMatch), Lookup string otherwise
| lrContent :: String | |
|
|
|
|
|
:: String | Lookup
| -> String | Full name
| -> Bool | Whether there is a prefix match
| Check for prefix matches in names.
Implemented in Ganeti core utils.text.MatchNameComponent
as the regexp r^%s(..*)?$ % re.escape(key)
|
|
|
|
Is the lookup priority a good one?
|
|
|
Is the lookup result an actual match?
|
|
|
:: String | Canonical (target) name
| -> String | Partial (lookup) name
| -> LookupResult | Result of the lookup
| Compares a canonical name and a lookup string.
|
|
|
|
:: String | Lookup key
| -> String | String to compare to the lookup key
| -> LookupResult | Previous result
| -> LookupResult | New result
| Lookup a string and choose the best result.
|
|
|
|
:: [String] | List of keys
| -> String | Lookup string
| -> LookupResult | Result of the lookup
| Find the canonical name for a lookup string in a list of names.
|
|
|
Produced by Haddock version 2.6.0 |