| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
type CompletionFunc (m :: Type -> Type) = (String, String) -> m (String, [Completion]) Source
Performs completions from the given line state.
The first String argument is the contents of the line to the left of the cursor, reversed. The second String argument is the contents of the line to the right of the cursor.
The output String is the unused portion of the left half of the line, reversed.
data Completion Source
| Completion | |
Fields
| |
| Show Completion Source | |
Defined in System.Console.Haskeline.Completion MethodsshowsPrec :: Int -> Completion -> ShowS show :: Completion -> String showList :: [Completion] -> ShowS | |
| Eq Completion Source | |
Defined in System.Console.Haskeline.Completion | |
| Ord Completion Source | |
Defined in System.Console.Haskeline.Completion Methodscompare :: Completion -> Completion -> Ordering (<) :: Completion -> Completion -> Bool (<=) :: Completion -> Completion -> Bool (>) :: Completion -> Completion -> Bool (>=) :: Completion -> Completion -> Bool max :: Completion -> Completion -> Completion min :: Completion -> Completion -> Completion | |
noCompletion :: Monad m => CompletionFunc m Source
Disable completion altogether.
simpleCompletion :: String -> Completion Source
Create a finished completion out of the given word.
fallbackCompletion :: Monad m => CompletionFunc m -> CompletionFunc m -> CompletionFunc m Source
If the first completer produces no suggestions, fallback to the second completer's output.
| :: Monad m | |
| => Maybe Char | An optional escape character |
| -> [Char] | Characters which count as whitespace |
| -> (String -> m [Completion]) | Function to produce a list of possible completions |
| -> CompletionFunc m |
A custom CompletionFunc which completes the word immediately to the left of the cursor.
A word begins either at the start of the line or after an unescaped whitespace character.
| :: Monad m | |
| => Maybe Char | An optional escape character |
| -> (Char -> Bool) | Characters which count as whitespace |
| -> (String -> m [Completion]) | Function to produce a list of possible completions |
| -> CompletionFunc m |
The same as completeWord but takes a predicate for the whitespace characters
| :: Monad m | |
| => Maybe Char | An optional escape character |
| -> [Char] | Characters which count as whitespace |
| -> (String -> String -> m [Completion]) | Function to produce a list of possible completions. The first argument is the line contents to the left of the word, reversed. The second argument is the word to be completed. |
| -> CompletionFunc m |
A custom CompletionFunc which completes the word immediately to the left of the cursor, and takes into account the line contents to the left of the word.
A word begins either at the start of the line or after an unescaped whitespace character.
| :: Monad m | |
| => Maybe Char | An optional escape character |
| -> (Char -> Bool) | Characters which count as whitespace |
| -> (String -> String -> m [Completion]) | Function to produce a list of possible completions. The first argument is the line contents to the left of the word, reversed. The second argument is the word to be completed. |
| -> CompletionFunc m |
The same as completeWordWithPrev but takes a predicate for the whitespace characters
| :: Monad m | |
| => Maybe Char | An optional escape character |
| -> [Char] | Characters which set off quotes |
| -> (String -> m [Completion]) | Function to produce a list of possible completions |
| -> CompletionFunc m | Alternate completion to perform if the cursor is not at a quoted word |
| -> CompletionFunc m |
completeFilename :: MonadIO m => CompletionFunc m Source
listFiles :: MonadIO m => FilePath -> m [Completion] Source
List all of the files or folders beginning with this path.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.12.1/docs/libraries/haskeline-0.8.2.1-0ce5/System-Console-Haskeline-Completion.html