dying_sphynx
dying_sphynx

Reputation: 1166

ghci tab-completion in haskell-mode

It's quite nice to have ghci integrated with Emacs through inferior-haskell-mode: this adds a wonderful possibility to quickly navigate to compile error locations, interactively inspect types, definitions, etc. Nevertheless, the major feature I'm missing in this setup is inability to use ghci tab-completion, which is quite helpful for completing functions available from imported modules, language extensions and ghci commands.

I assume that this functionality may be implemented rather trivially by passing raw "TAB" character to the ghci process, reading its output back and pasting the result into the Emacs buffer. Note that I haven't worked with "comint-mode" in Emacs, so I may be totally wrong.

Finally, we have come to my question: why this feature is missing from haskell-mode? Are there any obvious problems which I am unaware of, is it hard to implement, or is it just due to some historical reasons? (like "no one bothered to write it"). Do you have any workarounds for the problem? (except running ghci outside Emacs)

Upvotes: 17

Views: 2628

Answers (1)

Vagif Verdi
Vagif Verdi

Reputation: 4886

Check out ghc-mode that builds on top of haskell-mode and adds autocompletion and some other features.

There's also a haskell-emacs mode, which is different from haskell-mode. It also has autocompletion. Although it was quirky and not always worked when i tried it.

Upvotes: 6

Related Questions