try -base
The parser try p behaves like parser p, except that it pretends that it hasn't consumed any input when an error occurs.
This combinator is used whenever arbitrary look ahead is needed. Since it pretends that it hasn't consumed any input when p fails, the (<|>) combinator will try its second alternative even when the first parser failed while consuming input.
The try combinator can for example be used to distinguish identifiers and reserved words. Both reserved words and identifiers are a sequence of letters. Whenever we expect a certain reserved word
combinator. Suppose we write:
> expr = letExpr <|> identifier <?> "expression"
>
> letExpr = do{ string "let"; ... }
> identifier = many1 letter
If the user writes "lexical", the parser fails with: unexpected 'x', expecting 't' in "let". Indeed, since the (<|>) combinator only tries alternatives when the first alternative hasn't consumed input, the identifier parser is never tried (because the prefix "le" of the string "let" parser is already consumed). The right behaviour can be obtained by adding the try combinator:
> expr = letExpr <|> identifier <?> "expression"
>
> letExpr = do{ try (string "let"); ... }
> identifier = many1 letter
Catches any exception thrown by an CGI action, and returns either the exception, or if no exception was raised, the result of the action.
Try to use direct rendering, issue a warning and use indirect rendering if this is not possible.
A version of peekTChan which does not retry. Instead it returns Nothing if no value is available.
A version of readTChan which does not retry. Instead it returns Nothing if no value is available.
A version of readTMVar which does not retry. Instead it returns Nothing if no value is available.
Controls the color index colormap entry of the current window's logical colormap for the layer in use. The layer in use of the current window should be a color index window. The color index should be zero or greater and less than the total number of colormap entries for the window (see numColorMapEntries) and different from an overlay's transparent index (see transparentIndex).
If the layer in use's colormap was copied by reference, setting a colormap entry will force the duplication of the colormap.
Close the connection to the network name database.
getGroupEntryForID gid calls getgrgid to obtain the GroupEntry information associated with GroupID gid.
getGroupEntryForName name calls getgrnam to obtain the GroupEntry information associated with the group called name.
Show more results