GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:31:11Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/11268Extend ghc environment file features2019-07-07T18:31:11ZHerbert Valerio Riedelhvr@gnu.orgExtend ghc environment file featuresThis is essential to make it into GHC 8.0.1 as it provides the infrastructure for cabal's new features
See [D1668](https://phabricator.haskell.org/D1668) for more detail
<details><summary>Trac metadata</summary>
| Trac field ...This is essential to make it into GHC 8.0.1 as it provides the infrastructure for cabal's new features
See [D1668](https://phabricator.haskell.org/D1668) for more detail
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Extend ghc environment file features","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.0.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"This is essential to make it into GHC 8.0.1 as it provides the infrastructure for cabal's new features\r\n\r\nSee Phab:D1668 for more detail","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1duncanduncanhttps://gitlab.haskell.org/ghc/ghc/-/issues/5672parBufferWHNF could be less subtle2019-07-07T18:54:06ZduncanparBufferWHNF could be less subtleI would suggest modifying `parBufferWHNF` as follows, with the `{- x ``seq`` -}` actually included.
```
parBufferWHNF :: Int -> Strategy [a]
parBufferWHNF n0 xs0 = return (ret xs0 (start n0 xs0))
where -- ret :: [a] -> [a] -> [a]
...I would suggest modifying `parBufferWHNF` as follows, with the `{- x ``seq`` -}` actually included.
```
parBufferWHNF :: Int -> Strategy [a]
parBufferWHNF n0 xs0 = return (ret xs0 (start n0 xs0))
where -- ret :: [a] -> [a] -> [a]
ret (x:xs) (y:ys) = y `par` (x : ({-x `seq`-} ret xs ys))
ret xs _ = xs
-- start :: Int -> [a] -> [a]
start 0 ys = ys
start !_n [] = []
start !n (y:ys) = y `par` start (n-1) ys
```
The point of the extra `x ``seq`` ` is so that consumers that do not evaluate the list element before evaluating the next cons cell don't get such surprising loss of parallelism. For example non-strict left folds like `sum` will rush to the end of the list spine without evaluating the list elements, and then evaluate the elements later. That does not work well with the `parBufferWHNF` strategy. Adding the extra `seq` fixes it. Note that in this case I think `seq` or `pseq` would work.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 7.2.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries (other) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"parBufferWHNF could be less subtle","status":"New","operating_system":"","component":"libraries (other)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.2.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"I would suggest modifying `parBufferWHNF` as follows, with the `{- x ``seq`` -}` actually included.\r\n{{{\r\nparBufferWHNF :: Int -> Strategy [a]\r\nparBufferWHNF n0 xs0 = return (ret xs0 (start n0 xs0))\r\n where -- ret :: [a] -> [a] -> [a]\r\n ret (x:xs) (y:ys) = y `par` (x : ({-x `seq`-} ret xs ys))\r\n ret xs _ = xs\r\n\r\n -- start :: Int -> [a] -> [a]\r\n start 0 ys = ys\r\n start !_n [] = []\r\n start !n (y:ys) = y `par` start (n-1) ys\r\n}}}\r\n\r\nThe point of the extra `x ``seq`` ` is so that consumers that do not evaluate the list element before evaluating the next cons cell don't get such surprising loss of parallelism. For example non-strict left folds like `sum` will rush to the end of the list spine without evaluating the list elements, and then evaluate the elements later. That does not work well with the `parBufferWHNF` strategy. Adding the extra `seq` fixes it. Note that in this case I think `seq` or `pseq` would work.","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1duncanduncanhttps://gitlab.haskell.org/ghc/ghc/-/issues/3122Enhance --info2019-07-07T19:05:16ZIan Lynagh <igloo@earth.li>Enhance --infoWe should:
- Add things like C compiler, assembler, linker, libdir into the `--info` output
- Generalise `--print-libdir` such that `--print-foo` prints the foo field from the `--info` output.
<details><summary>Trac metadata</summary>
...We should:
- Add things like C compiler, assembler, linker, libdir into the `--info` output
- Generalise `--print-libdir` such that `--print-foo` prints the foo field from the `--info` output.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.10.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Enhance --info","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12 branch","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"igloo"},"version":"6.10.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"We should:\r\n * Add things like C compiler, assembler, linker, libdir into the `--info` output\r\n * Generalise `--print-libdir` such that `--print-foo` prints the foo field from the `--info` output.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1duncanduncan