Skip to content

Bug: Inferior-haskell: do not insert repeated prompts. #1867

Closed
@aitenate

Description

@aitenate

The recent change #1806 appears to have introduced an bug with inferior-haskell-mode output. The GHCi output can either be modified or missing entirely. Below are example of what an M-x run-haskell created buffer looks like without and with the change:

fc1ea06

ghci> ghci> :{
f x
  | x == 0 = 1
  | x < 0  = 1
  | otherwise = 2 * f (x - 1)
:}
ghci| ghci| ghci| ghci| ghci| ghci> f 1
2
ghci> f 1
2
ghci> f 1
2
ghci> f 1
2
ghci> 

495fb96

Loaded GHCi configuration from /nix/stghci> :{
f x
  | x == 0 = 1
  | x < 0  = 1
  | otherwise = 2 * f (x - 1)
:}
ghci> f 1
ghci> f 1
2ghci> f 1
2
ghci> f 1
2
ghci> f 1
2
ghci> 

This also impacts the use of Org-babel source blocks, which for me, may of may not output some subset of the result with repeated executions of the same pure expression.

While not wholly solving the original issue :set prompt-cont "" does get rid of most of the additional prompts in the original issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions