haskell / haskell/haskell-mode

Reenable interactive operator completions

Open
#1,253 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

Disabled in #1247.

GHCi prior to version 8.0.1 have bug in `:complete` command: when completing operators it returns a list of all imported identifiers (see Track [ticket](https://ghc.haskell.org/trac/ghc/ticket/10576)). This leads to significant Emacs slowdown. To aviod slowdown operator completions are disabled for now.

Suggested solution:
1. In the beginning of a session issues a test `:complete >>=` command.
2. See if output is okay or not okay.
3. Mark GHCi session as one with a working `:complete` or a broken `:complete` command.
4. Do not complete operators in sessions with broken complete.

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing GHCi session initialization and handling for the `:complete` command. Reproduce `:complete >>=`, record how working and broken output differ, and make operator completion conditional on that session result while preserving the workaround for older GHCi versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp, haskell
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.