diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Ghci.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Ghci.hs b/src/Ghci.hs index a36c05e..d3540cb 100644 --- a/src/Ghci.hs +++ b/src/Ghci.hs @@ -24,7 +24,7 @@ import qualified Data.ByteString.Lazy.UTF8 as LUTF8 import Data.ByteString.Short (ShortByteString) import qualified Data.ByteString.Short as BSS import Data.Char (isSpace, toLower) -import Data.List (nub) +import Data.List (nub, isPrefixOf) import Foreign (allocaBytes) import System.IO (hFlush, hIsClosed, hGetBufSome, hPutStrLn, stdout, stderr, Handle) import System.Process @@ -111,7 +111,7 @@ runStmtClever ghci pset line = _ -> runStmt ghci pset line where startsWith :: String -> String -> Bool - long `startsWith` short = take (length short) long == short + long `startsWith` short = short `isPrefixOf` long runStmt :: Ghci -> ParseSettings -> String -> IO (Ghci, Result String) runStmt ghci pset line = do |
