Skip to content

GHCi 9.2.0.20210422 erases left hand side of interactive declaration when tab completion is requested

Summary

When pressing while in an interactive prompt, all entered text left of the last equals sign (=) is removed.

Steps to reproduce

  1. Open GHCi (ghci or ghc --interactive)
  2. Type some text containing an equals sign (=) such as let x = 2 +
  3. Press the “tab” key ()

Expected behavior

GHCi will attempt to autocomplete the word left of the cursor.

Actual behavior

GHCi performs the expected behavior but also erases all text left of or at the rightmost equals sign (=).

Demonstration

View this behavior in action in this terminal recording:
https://asciinema.org/a/424970

Environment

  • GHC version used: 9.2.0.20210422

Optional:

  • Operating System: Pop!_OS 21.04 on Linux 5.11.0-7620-generic
  • System Architecture: x86 64
Edited by Anselm Schüler
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information