Skip to content

GHCi prompt alignment on multiline input

Summary

In GHCi since 9.0.1, I believe, the default prompt is ghci, but it disappears on multiline input, so you can't easily align things anymore.

Steps to reproduce

ghci> :set +m
ghci> let x = 1
|         y = 2
|

<interactive>:7:11: error: parse error on input ‘=’

Now some of the examples in the documentation also look like they are not properly aligned, e.g.:

ghci> :set +m
ghci> let x = 42
|     y = 3
|
ghci>

From here: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/ghci.html#multiline-input

Environment

  • GHC version used: 9.0.1
Edited by Jaro Reinders
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information