GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2021-12-11T14:21:50Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/14309Expand comment in hPutStrLn2021-12-11T14:21:50ZDavid FeuerExpand comment in hPutStrLnA comment on `hPutStrLn` reads
> An optimisation: we treat `hPutStrLn` specially, to avoid the
> overhead of a single `putChar '\n'`, which is quite high now that we
> have to encode eagerly.
This should reference some code or comment ...A comment on `hPutStrLn` reads
> An optimisation: we treat `hPutStrLn` specially, to avoid the
> overhead of a single `putChar '\n'`, which is quite high now that we
> have to encode eagerly.
This should reference some code or comment that explains why the cost is high, why we have to encode eagerly, what it even *means* to encode eagerly, etc.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.2.1 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Core Libraries |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Expand comment in hPutStrLn","status":"New","operating_system":"","component":"Core Libraries","related":[],"milestone":"8.4.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"A comment on `hPutStrLn` reads\r\n\r\n> An optimisation: we treat `hPutStrLn` specially, to avoid the\r\n> overhead of a single `putChar '\\n'`, which is quite high now that we\r\n> have to encode eagerly.\r\n\r\nThis should reference some code or comment that explains why the cost is high, why we have to encode eagerly, what it even ''means'' to encode eagerly, etc.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1Sylvain HenrySylvain Henry