Skip to content

Commit

Permalink
#57, send some blank lines to ghci first (or perhaps to something lik…
Browse files Browse the repository at this point in the history
…e stack)
  • Loading branch information
ndmitchell committed Apr 25, 2016
1 parent e2b801d commit 339e1a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Language/Haskell/Ghcid.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ startGhci cmd directory echo0 = do
hSetBuffering err LineBuffering
hSetBuffering inp LineBuffering

-- Some programs (e.g. stack) might use stdin before starting ghci (see #57)
-- Send them some empty lines
replicateM 3 $ hPutStrLn inp ""

-- I'd like the GHCi prompt to go away, but that's not possible, so I set it to a special
-- string and filter that out.
let ghcid_prefix = "#~GHCID-START~#"
Expand Down

0 comments on commit 339e1a9

Please sign in to comment.