GHC 7 does not process Handle correctly
Compile the following code:
module Main where
import qualified Data.ByteString.Lazy.Char8 as L
main :: IO ()
main = do
getLine >>= putStrLn
L.getContents >>= L.putStr
Let's call this binary "foo". If you compile this with GHC 6.12.3, the following command work well. That is, the entire of "any-file" is displayed.
% foo < any-file
However, if you compile this with GHC 7.0.1 or later, the command displays only the first line of "any-file".
This can be re-produced on Linux.
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Linux |
Architecture |