From doug at cs.dartmouth.edu Sun Aug 3 20:44:38 2014 From: doug at cs.dartmouth.edu (Doug McIlroy) Date: Sun, 03 Aug 2014 16:44:38 -0400 Subject: [Hugs-users] extra newline after putStrLn? Message-ID: <201408032044.s73Kices015683@tahoe.cs.dartmouth.edu> Why does putStrln "" produce two newlines in hugs, but one in ghci? Doug McIlroy From ndmitchell at gmail.com Sun Aug 3 20:59:33 2014 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sun, 3 Aug 2014 21:59:33 +0100 Subject: [Hugs-users] extra newline after putStrLn? In-Reply-To: <201408032044.s73Kices015683@tahoe.cs.dartmouth.edu> References: <201408032044.s73Kices015683@tahoe.cs.dartmouth.edu> Message-ID: Generally in Hugs, after doing an IO thing, it writes out a newline. In GHCi, it doesn't. On balance, I think the Hugs way is better, since in GHC it's easy to get to: Prelude> putStrLn "foo" foo Prelude> putStr "foo" fooPrelude> While in Hugs: Hugs> putStrLn "foo" foo Hugs> putStr "foo" foo Hugs> So it's nothing fundamental, just a difference in what to do after some arbitrary IO. Thanks, Neil On Sun, Aug 3, 2014 at 9:44 PM, Doug McIlroy wrote: > Why does putStrln "" produce two newlines in hugs, but one in ghci? > > Doug McIlroy > _______________________________________________ > Hugs-Users mailing list > Hugs-Users at haskell.org > http://www.haskell.org/mailman/listinfo/hugs-users