Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix prompt behaviour

  • Loading branch information...
commit 50fe3568f44502d898b68540abba428e24503b04 1 parent af8d084
@mikeplus64 authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/Language/Haskell/Repl.hs
View
7 src/Language/Haskell/Repl.hs
@@ -78,9 +78,10 @@ prompt r xs x = do
(tr,ir) <- progress lazyResults
threadDelay p
killThread tr
- elems <- readIORef ir
- let hs = take elems xs
- ends (trimLines hs) `seq` putMVar final hs
+ lineCount <- readIORef ir
+ case take lineCount lazyResults of
+ [] -> putMVar final []
+ hs -> ends (trimLines hs) `seq` putMVar final hs
_ -> putMVar final (trimLines lazyResults)
fin <- takeMVar final
Please sign in to comment.
Something went wrong with that request. Please try again.