Update from input by @lierdakil

This commit is contained in:
Alan Zimmerman 2015-10-01 08:54:13 +02:00
parent 1d370f5866
commit fc7b059f92

View File

@ -502,15 +502,15 @@ legacyInteractiveLoop symdbreq world = do
, GHandler $ \(SomeException e) -> gmErrStrLn (show e) >> return "" , GHandler $ \(SomeException e) -> gmErrStrLn (show e) >> return ""
] ]
getFileSourceFromStdin :: IO String
getFileSourceFromStdin = do getFileSourceFromStdin = do
let loop' acc = do linesIn <- readStdin'
line <- getLine return (intercalate "\n" linesIn)
if line == "\EOT" where
then return $ intercalate "\n" $ reverse $ ((init line):acc) readStdin' = do
else loop' (line:acc) x <- getLine
loop' [] if x/="\EOT"
then fmap (x:) readStdin'
else return []
-- Someone please already rewrite the cmdline parsing code *weep* :'( -- Someone please already rewrite the cmdline parsing code *weep* :'(
wrapGhcCommands :: (IOish m, GmOut m) => Options -> [String] -> m () wrapGhcCommands :: (IOish m, GmOut m) => Options -> [String] -> m ()