HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehaskeline-0.8.2.1Haskell98

System.Console.Haskeline.Completion

  • 2 types
  • 11 values
  • Packagehaskeline-0.8.2.1
  • Exports13
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceCompletion.hs
typetype CompletionFunc (m :: Type -> Type) = (String, String) -> m (String, [Completion])
#

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.

Word completion

5 declarations
valuecompleteWord
  1. :: Monad m
  2. => Maybe Char

    An optional escape character

  3. -> [Char]

    Characters which count as whitespace

  4. -> (String -> m [Completion])

    Function to produce a list of possible completions

  5. -> 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.

valuecompleteWordWithPrev
  1. :: Monad m
  2. => Maybe Char

    An optional escape character

  3. -> [Char]

    Characters which count as whitespace

  4. -> (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.

  5. -> 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.

Filename completion

3 declarations