GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:42:00Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/9086main :: IO Int does different things with runghc and when compiled2019-07-07T18:42:00ZNiklas Hambüchenmail@nh2.memain :: IO Int does different things with runghc and when compiledConsider
```
main :: IO Int
main = return 1
```
This does different things when compiled and when run with `runghc`/`runhaskell` (it prints an extra `1` with the latter).
For practical purposes, I think it is beneficial if either of t...Consider
```
main :: IO Int
main = return 1
```
This does different things when compiled and when run with `runghc`/`runhaskell` (it prints an extra `1` with the latter).
For practical purposes, I think it is beneficial if either of the two ways to run a Haskell program have the same output.
Or did somebody intend this to happen?
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | mail@nh2.me |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"main :: IO Int does different things with runghc and when compiled","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"7.10.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.8.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["mail@nh2.me"],"type":"Bug","description":"Consider\r\n\r\n{{{\r\nmain :: IO Int\r\nmain = return 1\r\n}}}\r\n\r\nThis does different things when compiled and when run with `runghc`/`runhaskell` (it prints an extra `1` with the latter).\r\n\r\nFor practical purposes, I think it is beneficial if either of the two ways to run a Haskell program have the same output.\r\n\r\nOr did somebody intend this to happen?","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1gintasgintas