Merge pull request #634 from alanz/timing-pr2
Speed up map-file loading
This commit is contained in:
commit
df1f9bb33f
@ -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
|
||||||
|
@ -504,12 +504,14 @@ legacyInteractiveLoop symdbreq world = do
|
|||||||
|
|
||||||
getFileSourceFromStdin :: IO String
|
getFileSourceFromStdin :: IO String
|
||||||
getFileSourceFromStdin = do
|
getFileSourceFromStdin = do
|
||||||
let loop' acc = do
|
linesIn <- readStdin'
|
||||||
line <- getLine
|
return (intercalate "\n" linesIn)
|
||||||
if not (null line) && last line == '\EOT'
|
where
|
||||||
then return $ acc ++ init line
|
readStdin' = do
|
||||||
else loop' (acc++line++"\n")
|
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 ()
|
||||||
|
Loading…
Reference in New Issue
Block a user