Multiline interpreter with editing of previous lines

Hi,
Is there a multiline interpreter for Haskell that lets you write multiline functions and edit previous lines?

Or otherwise is there a hacky way to do something like this with a command line interface library that would let you treat any command line app as having a multiline interface?

Python 3.13 released the other day contains such an interpreter, so I thought the timing would be good to ask this. OCaml has utop, which I am very happy with.

1 Like

You can start a multiline block with :{, define your function(s), and later close it with :} to “submit” it as a single block. IIRC it should also be possible to edit the previous lines in the same multiline block.