Re-add newlines to enable layout for multi-line input.
authorIan Lynagh <igloo@earth.li>
Wed, 2 Jun 2010 18:07:37 +0000 (18:07 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 2 Jun 2010 18:07:37 +0000 (18:07 +0000)
Patch from Adam Vogt <vogt.adam@gmail.com>
Partial fix for #3984

ghc/InteractiveUI.hs

index fb8bcb1..d119aac 100644 (file)
@@ -622,7 +622,7 @@ runOneCommand eh getCmd = do
       maybe (liftIO (ioError collectError))
             (\l->if removeSpaces l == ":}" 
                  then return (Just $ removeSpaces c) 
-                 else collectCommand q (c++map normSpace l))
+                 else collectCommand q (c ++ "\n" ++ map normSpace l))
       where normSpace '\r' = ' '
             normSpace   c  = c
     -- QUESTION: is userError the one to use here?