Speed up map-file loading
This commit is contained in:
parent
6b2246ebd6
commit
1d370f5866
@ -69,7 +69,7 @@
|
|||||||
(save-restriction
|
(save-restriction
|
||||||
(widen)
|
(widen)
|
||||||
(process-send-region pro (point-min) (point-max))))
|
(process-send-region pro (point-min) (point-max))))
|
||||||
(process-send-string pro "\004\n")
|
(process-send-string pro "\n\004\n")
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(let ((inhibit-quit nil))
|
(let ((inhibit-quit nil))
|
||||||
(while ghc-process-file-mapping
|
(while ghc-process-file-mapping
|
||||||
|
@ -506,10 +506,11 @@ getFileSourceFromStdin :: IO String
|
|||||||
getFileSourceFromStdin = do
|
getFileSourceFromStdin = do
|
||||||
let loop' acc = do
|
let loop' acc = do
|
||||||
line <- getLine
|
line <- getLine
|
||||||
if not (null line) && last line == '\EOT'
|
if line == "\EOT"
|
||||||
then return $ acc ++ init line
|
then return $ intercalate "\n" $ reverse $ ((init line):acc)
|
||||||
else loop' (acc++line++"\n")
|
else loop' (line:acc)
|
||||||
loop' ""
|
loop' []
|
||||||
|
|
||||||
|
|
||||||
-- 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 ()
|
||||||
|
Loading…
Reference in New Issue
Block a user