Skip to content

Auto completions related notes #1169

Open
@geraldus

Description

@geraldus

There is some mess around completions. We have:

  • haskell-completions.el
    provides:
    • hard-coded keywords list
    • hard-coded pragma names list
    • completion prefix grabbing functionality
    • non-interactive completion function:
      • pragmas, options, extensions, keywords
    • synchronous completion function, which completes:
      • pragmas, options, extensions, keywords without REPL
      • identifiers from REPL if it is available
      • modules for import statement from REPL if it is available
  • haskell-complete-module.el
    provides:
    • haskell-complete-module-read — very complicated function, interactively completes module name using mini-buffer
  • haskell-modules.el
    depends on haskell-complete-module.el
    provides:
    • haskell-add-import — this is major use function, others seem to be for internal use; all functions depend on REPL, if it's not available haskell-add-import reads module name from mini-buffer

haskell-complete-module-read is used in[1]:

  • haskell-mode-contextual-space from haskell.el (I didn't understand what does this function do yet)
  • haskell-process-suggest-imports from haskell-load.el
  • haskell-add-import from haskell-modules.el

  • research if haskell-completions-sync-completions-at-point should cover a case when REPL is not available, e.g. provide dabbrev completions (at least Emacs and company)[2]
  • research possibility of merging haskell-modules.el and haskell-complete-module.el
  • research possibility of merging two above packages with haskell-completions.el
  • research if we really need all this stuff to import modules

Related to #215

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions