GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:01:58Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/16025Makefiles bundled with source distribution fail to build cross-compiler.2019-07-07T18:01:58ZvanessamchaleMakefiles bundled with source distribution fail to build cross-compiler.When trying to build a cross-compiler with GHC 8.6.3, I ran into the following:
```
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Re...When trying to build a cross-compiler with GHC 8.6.3, I ran into the following:
```
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
ld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)
libraries/ghc-prim/dist-install/build/GHC/CString.o: error adding symbols: File in wrong format
echo libraries/ghc-prim/dist-install/build/GHC/CString.o libraries/ghc-prim/dist-install/build/GHC/Classes.o libraries/ghc-prim/dist-install/build/GHC/Debug.o libraries/ghc-prim/dist-install/build/GHC/IntWord64.o libraries/ghc-prim/dist-install/build/GHC/Magic.o libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o libraries/ghc-prim/dist-install/build/GHC/Tuple.o libraries/ghc-prim/dist-install/build/GHC/Types.o libraries/ghc-prim/dist-install/build/cbits/atomic.o libraries/ghc-prim/dist-install/build/cbits/bswap.o libraries/ghc-prim/dist-install/build/cbits/clz.o libraries/ghc-prim/dist-install/build/cbits/ctz.o libraries/ghc-prim/dist-install/build/cbits/debug.o libraries/ghc-prim/dist-install/build/cbits/longlong.o libraries/ghc-prim/dist-install/build/cbits/pdep.o libraries/ghc-prim/dist-install/build/cbits/pext.o libraries/ghc-prim/dist-install/build/cbits/popcnt.o libraries/ghc-prim/dist-install/build/cbits/word2float.o >> libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a.contents
libraries/ghc-prim/ghc.mk:4: recipe for target 'libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o' failed
make[1]: *** [libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o] Error 1
make[1]: *** Waiting for unfinished jobs....
"arm-linux-gnueabihf-ar" q libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a @libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a.contents
arm-linux-gnueabihf-ar: creating libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a
"rm" -f libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a.contents
Makefile:122: recipe for target 'all' failed
make: *** [all] Error 2
It seems that this was due to an error in mk/config.mk, viz.
LD_NO_GOLD = ld
LD = arm-linux-gnueabihf-ld.gold
NM = arm-linux-gnueabihf-nm
AR = arm-linux-gnueabihf-ar
OBJDUMP = arm-linux-gnueabihf-objdump
```
The variable `LD_NO_GOLD` should have the prefix `arm-linux-gnueabihf`. When I set `LD_NO_GOLD` to `arm-linux-gnueabihf-ld` manually, the build proceeds and works correctly.
Let me know if you need any additional information.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (make) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Makefiles bundled with source distribution fail to build cross-compiler.","status":"New","operating_system":"","component":"Build System (make)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"When trying to build a cross-compiler with GHC 8.6.3, I ran into the following:\r\n\r\n{{{\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nld: libraries/ghc-prim/dist-install/build/GHC/CString.o: Relocations in generic ELF (EM: 40)\r\nlibraries/ghc-prim/dist-install/build/GHC/CString.o: error adding symbols: File in wrong format\r\necho libraries/ghc-prim/dist-install/build/GHC/CString.o libraries/ghc-prim/dist-install/build/GHC/Classes.o libraries/ghc-prim/dist-install/build/GHC/Debug.o libraries/ghc-prim/dist-install/build/GHC/IntWord64.o libraries/ghc-prim/dist-install/build/GHC/Magic.o libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o libraries/ghc-prim/dist-install/build/GHC/Tuple.o libraries/ghc-prim/dist-install/build/GHC/Types.o libraries/ghc-prim/dist-install/build/cbits/atomic.o libraries/ghc-prim/dist-install/build/cbits/bswap.o libraries/ghc-prim/dist-install/build/cbits/clz.o libraries/ghc-prim/dist-install/build/cbits/ctz.o libraries/ghc-prim/dist-install/build/cbits/debug.o libraries/ghc-prim/dist-install/build/cbits/longlong.o libraries/ghc-prim/dist-install/build/cbits/pdep.o libraries/ghc-prim/dist-install/build/cbits/pext.o libraries/ghc-prim/dist-install/build/cbits/popcnt.o libraries/ghc-prim/dist-install/build/cbits/word2float.o >> libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a.contents\r\nlibraries/ghc-prim/ghc.mk:4: recipe for target 'libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o' failed\r\nmake[1]: *** [libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o] Error 1\r\nmake[1]: *** Waiting for unfinished jobs....\r\n\"arm-linux-gnueabihf-ar\" q libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a @libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a.contents\r\narm-linux-gnueabihf-ar: creating libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a\r\n\"rm\" -f libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a.contents \r\nMakefile:122: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\nIt seems that this was due to an error in mk/config.mk, viz.\r\nLD_NO_GOLD = ld\r\nLD = arm-linux-gnueabihf-ld.gold\r\nNM = arm-linux-gnueabihf-nm\r\nAR = arm-linux-gnueabihf-ar\r\nOBJDUMP = arm-linux-gnueabihf-objdump\r\n}}}\r\n\r\nThe variable {{{LD_NO_GOLD}}} should have the prefix {{{arm-linux-gnueabihf}}}. When I set {{{LD_NO_GOLD}}} to {{{arm-linux-gnueabihf-ld}}} manually, the build proceeds and works correctly.\r\n\r\nLet me know if you need any additional information.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/16024Kind Signatures on data instances2019-07-07T18:01:59ZAndrew MartinKind Signatures on data instancesThere's a comment in `compiler/typecheck/TcInstDcls.hs` that reads:
> The "header" is the part other than the data constructors themselves
> e.g. `data instance D [a] :: * -> * = ...`
> Here the "header" is the bit before the "=" sign...There's a comment in `compiler/typecheck/TcInstDcls.hs` that reads:
> The "header" is the part other than the data constructors themselves
> e.g. `data instance D [a] :: * -> * = ...`
> Here the "header" is the bit before the "=" sign
What's weird is that you cannot actually compile code that this example suggests is valid. Consider this:
```
{-# language TypeFamilies #-}
module BadSig where
data family Bar a :: *
data instance Bar Int :: * = Bool
```
It fails on GHC 8.6.2 with:
```
bad_sig.hs:6:28: error:
parse error on input ‘=’
Perhaps you need a 'let' in a 'do' block?
e.g. 'let x = 5' instead of 'x = 5'
|
6 | data instance Bar Int :: * = Bool
| ^
```
Oddly, GHC will accept the instance if the body is missing:
```
{-# language TypeFamilies #-}
module BadSig where
data family Bar a :: *
data instance Bar Int :: *
```
It is not clear to me whether or not this one should be accepted, but that is beside the point. The first example should certainly be accepted. It should also be accepted with `TYPE 'LiftedRep` instead of `*`, but it fails with the same parser error when given that kind signature as well.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Kind Signatures on data instances","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"There's a comment in `compiler/typecheck/TcInstDcls.hs` that reads:\r\n\r\n> The \"header\" is the part other than the data constructors themselves\r\n\r\n> e.g. `data instance D [a] :: * -> * = ...`\r\n\r\n> Here the \"header\" is the bit before the \"=\" sign\r\n\r\nWhat's weird is that you cannot actually compile code that this example suggests is valid. Consider this:\r\n\r\n{{{\r\n{-# language TypeFamilies #-}\r\n \r\nmodule BadSig where\r\n\r\ndata family Bar a :: *\r\ndata instance Bar Int :: * = Bool\r\n}}}\r\n\r\nIt fails on GHC 8.6.2 with:\r\n\r\n{{{\r\nbad_sig.hs:6:28: error:\r\n parse error on input ‘=’\r\n Perhaps you need a 'let' in a 'do' block?\r\n e.g. 'let x = 5' instead of 'x = 5'\r\n |\r\n6 | data instance Bar Int :: * = Bool\r\n | ^\r\n}}}\r\n\r\nOddly, GHC will accept the instance if the body is missing:\r\n\r\n{{{\r\n{-# language TypeFamilies #-}\r\n \r\nmodule BadSig where\r\n\r\ndata family Bar a :: *\r\ndata instance Bar Int :: *\r\n}}}\r\n\r\nIt is not clear to me whether or not this one should be accepted, but that is beside the point. The first example should certainly be accepted. It should also be accepted with `TYPE 'LiftedRep` instead of `*`, but it fails with the same parser error when given that kind signature as well.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/16023Can't bootstrap GHC HEAD with GHC 8.6 on Windows2019-07-07T18:01:59ZBen GamariCan't bootstrap GHC HEAD with GHC 8.6 on WindowsAttempting to bootstrap GHC HEAD with GHC 8.6 on Windows fails shortly after starting the build with
```
...
Configuring hsc2hs-0.68.4.1...
"inplace/bin/ghc-cabal.exe" configure utils/gen-dll dist --with-ghc="/home/ben/ghc-8.6.3-amd64/b...Attempting to bootstrap GHC HEAD with GHC 8.6 on Windows fails shortly after starting the build with
```
...
Configuring hsc2hs-0.68.4.1...
"inplace/bin/ghc-cabal.exe" configure utils/gen-dll dist --with-ghc="/home/ben/ghc-8.6.3-amd64/bin/ghc.exe" --with-ghc-pkg="/home/ben/ghc-8.6.3-amd64/bin/ghc-pkg" --packag
e-db=C:/msys64/home/ben/ghc/libraries/bootstrapping.conf --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --configure-optio
n=CFLAGS="-Wall -fno-stack-protector -Wno-error=inline" --configure-option=LDFLAGS=" " --configure-option=CPPFLAGS=" " --gcc-options="-Wall -fno-stack-protector -W
no-error=inline " --constraint "binary == 0.8.6.0" --constraint "text == 1.2.3.1" --constraint "transformers == 0.5.5.0" --constraint "mtl == 2.2.2" --constrain
t "parsec == 3.1.13.0" --constraint "Cabal == 2.5.0.0" --constraint "hpc == 0.6.0.3" --constraint "ghc-boot-th == 8.7" --constraint "ghc-boot == 8.7" --constraint
"template-haskell == 2.15.0.0" --constraint "ghc-heap == 8.7" --constraint "ghci == 8.7" --with-gcc="C:\\msys64\\home\\ben\\ghc-8.6.3-amd64\\lib\\../mingw/bin/gcc.exe"
--with-ld="C:\\msys64\\home\\ben\\ghc-8.6.3-amd64\\lib\\../mingw/bin/ld.exe" --with-ar="C:\\msys64\\home\\ben\\ghc-8.6.3-amd64\\lib\\../mingw/bin/ar.exe" --with-alex="\Use
rs\ben\AppData\Roaming/cabal/bin/alex" --with-happy="\Users\ben\AppData\Roaming/cabal/bin/happy"
Configuring gen-dll-0.1...
ghc-cabal.exe: Encountered missing dependencies:
containers ==0.5.*
make[1]: *** [utils/gen-dll/ghc.mk:19: utils/gen-dll/dist/package-data.mk] Error 1
make: *** [Makefile:124: all] Error 2
```
Given that the build succeeds when bootstrapping with GHC 8.4, I suspect that this is a regression in the Cabal released with 8.6.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Can't bootstrap GHC HEAD with GHC 8.6 on Windows","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Attempting to bootstrap GHC HEAD with GHC 8.6 on Windows fails shortly after starting the build with\r\n{{{\r\n...\r\nConfiguring hsc2hs-0.68.4.1...\r\n\"inplace/bin/ghc-cabal.exe\" configure utils/gen-dll dist --with-ghc=\"/home/ben/ghc-8.6.3-amd64/bin/ghc.exe\" --with-ghc-pkg=\"/home/ben/ghc-8.6.3-amd64/bin/ghc-pkg\" --packag\r\ne-db=C:/msys64/home/ben/ghc/libraries/bootstrapping.conf --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --configure-optio\r\nn=CFLAGS=\"-Wall -fno-stack-protector -Wno-error=inline\" --configure-option=LDFLAGS=\" \" --configure-option=CPPFLAGS=\" \" --gcc-options=\"-Wall -fno-stack-protector -W\r\nno-error=inline \" --constraint \"binary == 0.8.6.0\" --constraint \"text == 1.2.3.1\" --constraint \"transformers == 0.5.5.0\" --constraint \"mtl == 2.2.2\" --constrain\r\nt \"parsec == 3.1.13.0\" --constraint \"Cabal == 2.5.0.0\" --constraint \"hpc == 0.6.0.3\" --constraint \"ghc-boot-th == 8.7\" --constraint \"ghc-boot == 8.7\" --constraint\r\n \"template-haskell == 2.15.0.0\" --constraint \"ghc-heap == 8.7\" --constraint \"ghci == 8.7\" --with-gcc=\"C:\\\\msys64\\\\home\\\\ben\\\\ghc-8.6.3-amd64\\\\lib\\\\../mingw/bin/gcc.exe\"\r\n --with-ld=\"C:\\\\msys64\\\\home\\\\ben\\\\ghc-8.6.3-amd64\\\\lib\\\\../mingw/bin/ld.exe\" --with-ar=\"C:\\\\msys64\\\\home\\\\ben\\\\ghc-8.6.3-amd64\\\\lib\\\\../mingw/bin/ar.exe\" --with-alex=\"\\Use\r\nrs\\ben\\AppData\\Roaming/cabal/bin/alex\" --with-happy=\"\\Users\\ben\\AppData\\Roaming/cabal/bin/happy\"\r\nConfiguring gen-dll-0.1...\r\nghc-cabal.exe: Encountered missing dependencies:\r\ncontainers ==0.5.*\r\n\r\nmake[1]: *** [utils/gen-dll/ghc.mk:19: utils/gen-dll/dist/package-data.mk] Error 1\r\nmake: *** [Makefile:124: all] Error 2\r\n\r\n\r\n}}}\r\n\r\nGiven that the build succeeds when bootstrapping with GHC 8.4, I suspect that this is a regression in the Cabal released with 8.6.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/16022Hadrian appears to link against libffi unconditionally2023-07-04T07:00:12ZBen GamariHadrian appears to link against libffi unconditionallyHadrian appears to be linking against `libffi`, even on platforms where it should not be used.
I suspect the cause is that Hadrian makes no attempt to set the `ffi` flag when configuring `rts`.
<details><summary>Trac metadata</summary>...Hadrian appears to be linking against `libffi`, even on platforms where it should not be used.
I suspect the cause is that Hadrian makes no attempt to set the `ffi` flag when configuring `rts`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hadrian appears to link against libffi unconditionally","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Hadrian appears to be linking against `libffi`, even on platforms where it should not be used.\r\n\r\nI suspect the cause is that Hadrian makes no attempt to set the `ffi` flag when configuring `rts`.","type_of_failure":"OtherFailure","blocking":[]} -->9.4.1https://gitlab.haskell.org/ghc/ghc/-/issues/16021Hadrian: remove/refactor package specific hacks2019-07-07T18:01:59ZdavideHadrian: remove/refactor package specific hacksHadrian implements a number of package specific hacks (e.g. see #16020). Such hacks should be discussed in this ticket and ideally removed or refactored.
Hacks:
- libffi (#16020)
<details><summary>Trac metadata</summary>
| Trac field...Hadrian implements a number of package specific hacks (e.g. see #16020). Such hacks should be discussed in this ticket and ideally removed or refactored.
Hacks:
- libffi (#16020)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hadrian: remove/refactor package specific hacks","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Hadrian implements a number of package specific hacks (e.g. see #16020). Such hacks should be discussed in this ticket and ideally removed or refactored.\r\n\r\nHacks:\r\n* libffi (#16020)","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3David EichmannDavid Eichmannhttps://gitlab.haskell.org/ghc/ghc/-/issues/16020Hadrian: correctly Install libffi shared object files2019-07-07T18:01:59ZdavideHadrian: correctly Install libffi shared object filesIn [D5423](https://phabricator.haskell.org/D5423) a hack to correctly install the libffi .so files is implemented. This is a quick and dirty solution to fix the hadrian build. Note \[Hadrian: install libffi hack\] from that patch and als...In [D5423](https://phabricator.haskell.org/D5423) a hack to correctly install the libffi .so files is implemented. This is a quick and dirty solution to fix the hadrian build. Note \[Hadrian: install libffi hack\] from that patch and also issue #15837 have more details, but ultimately hadrian should not have a special case for libffi.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.2 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hadrian: correctly Install libffi shared object files","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"In Phab:D5423 a hack to correctly install the libffi .so files is implemented. This is a quick and dirty solution to fix the hadrian build. Note [Hadrian: install libffi hack] from that patch and also issue #15837 have more details, but ultimately hadrian should not have a special case for libffi.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3davidedavidehttps://gitlab.haskell.org/ghc/ghc/-/issues/16019Harbormaster: OS X build fails2019-07-07T18:02:00ZPeter Trommlerptrommler@acm.orgHarbormaster: OS X build failsFrom Build 64479 https://phabricator.haskell.org/harbormaster/build/64479/
```
rts/sm/CNF.c:1002:13: error:
486 error: declaration does not declare anything [-Werror,-Wmissing-declarations]
487 FALLTHROUGH;
488 ...From Build 64479 https://phabricator.haskell.org/harbormaster/build/64479/
```
rts/sm/CNF.c:1002:13: error:
486 error: declaration does not declare anything [-Werror,-Wmissing-declarations]
487 FALLTHROUGH;
488 ^
489 |
490 1002 | FALLTHROUGH;
491 | ^
492
493 includes/Stg.h:201:21: error:
494 note: expanded from macro 'FALLTHROUGH'
495 |
496 201 | #define FALLTHROUGH GNU_ATTRIBUTE(fallthrough)
497 | ^
498 #define FALLTHROUGH GNU_ATTRIBUTE(fallthrough)
499 ^
500
501 includes/Stg.h:188:27: error:
502 note: expanded from macro 'GNU_ATTRIBUTE'
503 |
504 188 | #define GNU_ATTRIBUTE(at) __attribute__((at))
505 | ^
506 #define GNU_ATTRIBUTE(at) __attribute__((at))
507 ^
```
Marking this as highest priority because it is a regression and it breaks CI.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Harbormaster: OS X build fails","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"From Build 64479 https://phabricator.haskell.org/harbormaster/build/64479/\r\n{{{\r\nrts/sm/CNF.c:1002:13: error:\r\n486\t error: declaration does not declare anything [-Werror,-Wmissing-declarations]\r\n487\t FALLTHROUGH;\r\n488\t ^\r\n489\t |\r\n490\t1002 | FALLTHROUGH;\r\n491\t | ^\r\n492\t\r\n493\tincludes/Stg.h:201:21: error:\r\n494\t note: expanded from macro 'FALLTHROUGH'\r\n495\t |\r\n496\t201 | #define FALLTHROUGH GNU_ATTRIBUTE(fallthrough)\r\n497\t | ^\r\n498\t#define FALLTHROUGH GNU_ATTRIBUTE(fallthrough)\r\n499\t ^\r\n500\t\r\n501\tincludes/Stg.h:188:27: error:\r\n502\t note: expanded from macro 'GNU_ATTRIBUTE'\r\n503\t |\r\n504\t188 | #define GNU_ATTRIBUTE(at) __attribute__((at))\r\n505\t | ^\r\n506\t#define GNU_ATTRIBUTE(at) __attribute__((at))\r\n507\t ^\r\n}}}\r\n\r\nMarking this as highest priority because it is a regression and it breaks CI.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/16018Disabling core optimizations ignores code that would otherwise warn.2023-01-23T21:44:15ZdmjioDisabling core optimizations ignores code that would otherwise warn.Given the below code snippet,
```hs
module Main where
main :: IO ()
main = putStrLn "hey"
data StopLight
= Red
| Green
| Yellow
deriving (Show, Eq)
data Intersection
= Intersection
{ light :: {-# UNPACK #-} !StopLight
}...Given the below code snippet,
```hs
module Main where
main :: IO ()
main = putStrLn "hey"
data StopLight
= Red
| Green
| Yellow
deriving (Show, Eq)
data Intersection
= Intersection
{ light :: {-# UNPACK #-} !StopLight
} deriving (Show, Eq)
```
The above code will warn with optimizations enabled (`ghc -Wall -O2 Main.hs`), message below:
```
Main.hs:13:5: warning:
• Ignoring unusable UNPACK pragma
on the first argument of ‘Intersection’
• In the definition of data constructor ‘Intersection’
In the data type declaration for ‘Intersection’
|
13 | = Intersection
```
Without optimizations, no warnings are emitted `ghc -Wall -O0 Main.hs`.
The desired behavior should be a warning emitted in both cases.8.6.2https://gitlab.haskell.org/ghc/ghc/-/issues/16017ghc-8.6.1 and ghc-8.6.2 use a lot of memory2019-08-27T08:57:19ZJohn Kyghc-8.6.1 and ghc-8.6.2 use a lot of memoryCurrently GHC uses a lot of memory to build a relatively small module and causes my CI to fail due to there being a 4G memory limit.
The source code can be found here:
https://github.com/haskell-works/hw-json/tree/73368cee21dc72eedd529...Currently GHC uses a lot of memory to build a relatively small module and causes my CI to fail due to there being a 4G memory limit.
The source code can be found here:
https://github.com/haskell-works/hw-json/tree/73368cee21dc72eedd5291ba689f9abf10e7fcd2
The problem module is here:
https://github.com/haskell-works/hw-json/blob/73368cee21dc72eedd5291ba689f9abf10e7fcd2/test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs
The build output follows:
```
cabal new-build --enable-tests --enable-benchmarks --project-file="cabal.project" -j${CABAL_THREADS:-4} all
Build profile: -w ghc-8.6.2 -O2
In order, the following will be built (use -v for more details):
- hw-json-0.9.0.1 (lib) (first run)
- hw-json-0.9.0.1 (test:hw-json-test) (first run)
- hw-json-0.9.0.1 (exe:hw-json) (first run)
- hw-json-0.9.0.1 (bench:bench) (first run)
Configuring library for hw-json-0.9.0.1..
Preprocessing library for hw-json-0.9.0.1..
Building library for hw-json-0.9.0.1..
[ 1 of 32] Compiling HaskellWorks.Data.Json.DecodeError ( src/HaskellWorks/Data/Json/DecodeError.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/DecodeError.o )
[ 2 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.MakeIndex ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.o )
[ 3 of 32] Compiling HaskellWorks.Data.Json.Internal.Index ( src/HaskellWorks/Data/Json/Internal/Index.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Index.o )
[ 4 of 32] Compiling HaskellWorks.Data.Json.Internal.PartialIndex ( src/HaskellWorks/Data/Json/Internal/PartialIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/PartialIndex.o )
[ 5 of 32] Compiling HaskellWorks.Data.Json.Internal.Token.Types ( src/HaskellWorks/Data/Json/Internal/Token/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token/Types.o )
[ 6 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Token.Tokenize ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.o )
[ 7 of 32] Compiling HaskellWorks.Data.Json.Internal.Token ( src/HaskellWorks/Data/Json/Internal/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token.o )
[ 8 of 32] Compiling HaskellWorks.Data.Json.Internal.Value ( src/HaskellWorks/Data/Json/Internal/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Value.o )
[ 9 of 32] Compiling HaskellWorks.Data.Json.Internal.Word8 ( src/HaskellWorks/Data/Json/Internal/Word8.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word8.o )
[10 of 32] Compiling HaskellWorks.Data.Json.Internal.Word64 ( src/HaskellWorks/Data/Json/Internal/Word64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word64.o )
[11 of 32] Compiling HaskellWorks.Data.Json.Internal.CharLike ( src/HaskellWorks/Data/Json/Internal/CharLike.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/CharLike.o )
[12 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Blank ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.o )
[13 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.BlankedJson ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.o )
[14 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToInterestBits64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.o )
[15 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToBalancedParens64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.o )
[16 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.IbBp ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.o )
[17 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.o )
[18 of 32] Compiling HaskellWorks.Data.Json.Backend.Simple.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.o )
[19 of 32] Compiling HaskellWorks.Data.Json.LightJson ( src/HaskellWorks/Data/Json/LightJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LightJson.o )
[20 of 32] Compiling HaskellWorks.Data.Json.PartialValue ( src/HaskellWorks/Data/Json/PartialValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/PartialValue.o )
[21 of 32] Compiling HaskellWorks.Data.Json.Type ( src/HaskellWorks/Data/Json/Type.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Type.o )
[22 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Cursor ( src/HaskellWorks/Data/Json/Backend/Standard/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Cursor.o )
[23 of 32] Compiling HaskellWorks.Data.Json.Cursor ( src/HaskellWorks/Data/Json/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Cursor.o )
[24 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Cursor.Token ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.o )
[25 of 32] Compiling HaskellWorks.Data.Json.Value ( src/HaskellWorks/Data/Json/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Value.o )
[26 of 32] Compiling HaskellWorks.Data.Json.FromValue ( src/HaskellWorks/Data/Json/FromValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/FromValue.o )
[27 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.LoadCursor ( src/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.o )
[28 of 32] Compiling HaskellWorks.Data.Json.LoadCursor ( src/HaskellWorks/Data/Json/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LoadCursor.o )
[29 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Load ( src/HaskellWorks/Data/Json/Backend/Standard/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Load.o )
[30 of 32] Compiling HaskellWorks.Data.Json.Load ( src/HaskellWorks/Data/Json/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Load.o )
[31 of 32] Compiling HaskellWorks.Data.Json ( src/HaskellWorks/Data/Json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json.o )
[32 of 32] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/Paths_hw_json.o )
Configuring test suite 'hw-json-test' for hw-json-0.9.0.1..
Configuring benchmark 'bench' for hw-json-0.9.0.1..
Configuring executable 'hw-json' for hw-json-0.9.0.1..
Preprocessing test suite 'hw-json-test' for hw-json-0.9.0.1..
Building test suite 'hw-json-test' for hw-json-0.9.0.1..
Preprocessing executable 'hw-json' for hw-json-0.9.0.1..
Preprocessing benchmark 'bench' for hw-json-0.9.0.1..
Building benchmark 'bench' for hw-json-0.9.0.1..
Building executable 'hw-json' for hw-json-0.9.0.1..
[ 1 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.Cursor.InterestBitsSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.o )
[1 of 2] Compiling Main ( bench/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Main.o )
[1 of 7] Compiling App.Commands.Types ( app/App/Commands/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Types.o )
[2 of 7] Compiling App.Lens ( app/App/Lens.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Lens.o )
[3 of 7] Compiling App.Commands.Demo ( app/App/Commands/Demo.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Demo.o )
[2 of 2] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Paths_hw_json.o )
Linking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench ...
[4 of 7] Compiling App.Commands.CreateIndex ( app/App/Commands/CreateIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/CreateIndex.o )
[5 of 7] Compiling App.Commands ( app/App/Commands.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands.o )
[ 2 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.CursorSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.o )
[6 of 7] Compiling Main ( app/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Main.o )
[7 of 7] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Paths_hw_json.o )
Linking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json ...
cabal: Failed to build test:hw-json-test from hw-json-0.9.0.1. The build
process was killed (i.e. SIGKILL). The typical reason for this is that there
is not enough memory available (e.g. the OS killed a process using lots of
memory).
Exited with code 1
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghc-8.6.1 and ghc-8.6.2 use a log of memory","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Currently GHC uses a lot of memory to build a relatively small module and causes my CI to fail due to there being a 4G memory limit.\r\n\r\nThe source code can be found here:\r\n\r\nhttps://github.com/haskell-works/hw-json/tree/73368cee21dc72eedd5291ba689f9abf10e7fcd2\r\n\r\nThe problem module is here:\r\n\r\nhttps://github.com/haskell-works/hw-json/blob/73368cee21dc72eedd5291ba689f9abf10e7fcd2/test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs\r\n\r\nThe build output follows:\r\n\r\n{{{\r\ncabal new-build --enable-tests --enable-benchmarks --project-file=\"cabal.project\" -j${CABAL_THREADS:-4} all\r\nBuild profile: -w ghc-8.6.2 -O2\r\nIn order, the following will be built (use -v for more details):\r\n - hw-json-0.9.0.1 (lib) (first run)\r\n - hw-json-0.9.0.1 (test:hw-json-test) (first run)\r\n - hw-json-0.9.0.1 (exe:hw-json) (first run)\r\n - hw-json-0.9.0.1 (bench:bench) (first run)\r\nConfiguring library for hw-json-0.9.0.1..\r\nPreprocessing library for hw-json-0.9.0.1..\r\nBuilding library for hw-json-0.9.0.1..\r\n[ 1 of 32] Compiling HaskellWorks.Data.Json.DecodeError ( src/HaskellWorks/Data/Json/DecodeError.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/DecodeError.o )\r\n[ 2 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.MakeIndex ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.o )\r\n[ 3 of 32] Compiling HaskellWorks.Data.Json.Internal.Index ( src/HaskellWorks/Data/Json/Internal/Index.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Index.o )\r\n[ 4 of 32] Compiling HaskellWorks.Data.Json.Internal.PartialIndex ( src/HaskellWorks/Data/Json/Internal/PartialIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/PartialIndex.o )\r\n[ 5 of 32] Compiling HaskellWorks.Data.Json.Internal.Token.Types ( src/HaskellWorks/Data/Json/Internal/Token/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token/Types.o )\r\n[ 6 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Token.Tokenize ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.o )\r\n[ 7 of 32] Compiling HaskellWorks.Data.Json.Internal.Token ( src/HaskellWorks/Data/Json/Internal/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token.o )\r\n[ 8 of 32] Compiling HaskellWorks.Data.Json.Internal.Value ( src/HaskellWorks/Data/Json/Internal/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Value.o )\r\n[ 9 of 32] Compiling HaskellWorks.Data.Json.Internal.Word8 ( src/HaskellWorks/Data/Json/Internal/Word8.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word8.o )\r\n[10 of 32] Compiling HaskellWorks.Data.Json.Internal.Word64 ( src/HaskellWorks/Data/Json/Internal/Word64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word64.o )\r\n[11 of 32] Compiling HaskellWorks.Data.Json.Internal.CharLike ( src/HaskellWorks/Data/Json/Internal/CharLike.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/CharLike.o )\r\n[12 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Blank ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.o )\r\n[13 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.BlankedJson ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.o )\r\n[14 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToInterestBits64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.o )\r\n[15 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToBalancedParens64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.o )\r\n[16 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.IbBp ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.o )\r\n[17 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.o )\r\n[18 of 32] Compiling HaskellWorks.Data.Json.Backend.Simple.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.o )\r\n[19 of 32] Compiling HaskellWorks.Data.Json.LightJson ( src/HaskellWorks/Data/Json/LightJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LightJson.o )\r\n[20 of 32] Compiling HaskellWorks.Data.Json.PartialValue ( src/HaskellWorks/Data/Json/PartialValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/PartialValue.o )\r\n[21 of 32] Compiling HaskellWorks.Data.Json.Type ( src/HaskellWorks/Data/Json/Type.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Type.o )\r\n[22 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Cursor ( src/HaskellWorks/Data/Json/Backend/Standard/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Cursor.o )\r\n[23 of 32] Compiling HaskellWorks.Data.Json.Cursor ( src/HaskellWorks/Data/Json/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Cursor.o )\r\n[24 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Cursor.Token ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.o )\r\n[25 of 32] Compiling HaskellWorks.Data.Json.Value ( src/HaskellWorks/Data/Json/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Value.o )\r\n[26 of 32] Compiling HaskellWorks.Data.Json.FromValue ( src/HaskellWorks/Data/Json/FromValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/FromValue.o )\r\n[27 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.LoadCursor ( src/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.o )\r\n[28 of 32] Compiling HaskellWorks.Data.Json.LoadCursor ( src/HaskellWorks/Data/Json/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LoadCursor.o )\r\n[29 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Load ( src/HaskellWorks/Data/Json/Backend/Standard/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Load.o )\r\n[30 of 32] Compiling HaskellWorks.Data.Json.Load ( src/HaskellWorks/Data/Json/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Load.o )\r\n[31 of 32] Compiling HaskellWorks.Data.Json ( src/HaskellWorks/Data/Json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json.o )\r\n[32 of 32] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/Paths_hw_json.o )\r\nConfiguring test suite 'hw-json-test' for hw-json-0.9.0.1..\r\nConfiguring benchmark 'bench' for hw-json-0.9.0.1..\r\nConfiguring executable 'hw-json' for hw-json-0.9.0.1..\r\nPreprocessing test suite 'hw-json-test' for hw-json-0.9.0.1..\r\nBuilding test suite 'hw-json-test' for hw-json-0.9.0.1..\r\nPreprocessing executable 'hw-json' for hw-json-0.9.0.1..\r\nPreprocessing benchmark 'bench' for hw-json-0.9.0.1..\r\nBuilding benchmark 'bench' for hw-json-0.9.0.1..\r\nBuilding executable 'hw-json' for hw-json-0.9.0.1..\r\n[ 1 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.Cursor.InterestBitsSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.o )\r\n[1 of 2] Compiling Main ( bench/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Main.o )\r\n[1 of 7] Compiling App.Commands.Types ( app/App/Commands/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Types.o )\r\n[2 of 7] Compiling App.Lens ( app/App/Lens.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Lens.o )\r\n[3 of 7] Compiling App.Commands.Demo ( app/App/Commands/Demo.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Demo.o )\r\n[2 of 2] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Paths_hw_json.o )\r\nLinking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench ...\r\n[4 of 7] Compiling App.Commands.CreateIndex ( app/App/Commands/CreateIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/CreateIndex.o )\r\n[5 of 7] Compiling App.Commands ( app/App/Commands.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands.o )\r\n[ 2 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.CursorSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.o )\r\n[6 of 7] Compiling Main ( app/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Main.o )\r\n[7 of 7] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Paths_hw_json.o )\r\nLinking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json ...\r\ncabal: Failed to build test:hw-json-test from hw-json-0.9.0.1. The build\r\nprocess was killed (i.e. SIGKILL). The typical reason for this is that there\r\nis not enough memory available (e.g. the OS killed a process using lots of\r\nmemory).\r\n\r\nExited with code 1\r\n}}}\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3Alp MestanogullariAlp Mestanogullarihttps://gitlab.haskell.org/ghc/ghc/-/issues/16016Hadrian build fails on FreeBSD2021-06-08T16:56:34ZBen GamariHadrian build fails on FreeBSDA plain hadrian build using `hadrian/build.cabal.sh` bootstrapped with GHC 8.4.3 from `ports` fails with
```
/---------------------------------------------------------------------------------\
| Successfully built program 'ghc-pkg' (Sta...A plain hadrian build using `hadrian/build.cabal.sh` bootstrapped with GHC 8.4.3 from `ports` fails with
```
/---------------------------------------------------------------------------------\
| Successfully built program 'ghc-pkg' (Stage0). |
| Executable: _build/stage0/bin/ghc-pkg |
| Program synopsis: A utility for querying and managing the GHC package database. |
\---------------------------------------------------------------------------------/
hadrian: '/usr/home/ben/ghc/_build/stage0/bin/ghc' exited with an error:
ghc: missing -B<dir> option
shakeArgsWith 0.000s 0%
Function shake 0.392s 0%
Database read 0.000s 0%
With database 0.000s 0%
Running rules 1725.240s 99% =========================
Total 1725.633s 100%
Error when running Shake build system:
at src/Rules.hs:(32,19)-(45,17):
at src/Rules.hs:45:5-17:
* Depends on: _build/stage1/lib/bin/unlit
at src/Development/Shake/Internal/Rules/Oracle.hs:157:43-68:
* Depends on: OracleQ (PackageDataFile (Context {stage = Stage1, package = Package {pkgLanguage = Haskell, pkgType = Program, pkgName = "unlit", pkgPath = "utils/unlit"}, way = v}))
at src/Hadrian/Haskell/Cabal/Parse.hs:200:5-36:
* Depends on: _build/stage1/utils/unlit/setup-config
* Raised the exception:
ExitFailure 1
```
on FreeBSD 11 on amd64.Make removalhttps://gitlab.haskell.org/ghc/ghc/-/issues/16015git notes logic breaks CircleCI validation of pull requests2019-07-07T18:02:01ZBen Gamarigit notes logic breaks CircleCI validation of pull requestsDue to missing credentials. David, can you have a look?
https://circleci.com/gh/ghc/ghc/12493
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version ...Due to missing credentials. David, can you have a look?
https://circleci.com/gh/ghc/ghc/12493
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | davide |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"git notes logic breaks CircleCI validation of pull requests","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["davide"],"type":"Bug","description":"Due to missing credentials. David, can you have a look?\r\n\r\nhttps://circleci.com/gh/ghc/ghc/12493","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/16014Avoid unnecessary code duplication from String Literals.2022-11-22T03:33:52ZAndreas KlebingerAvoid unnecessary code duplication from String Literals.When we compile a function like this:
```
foo :: Int -> String
foo 1 = "1_String"
foo 2 = "2_String"
foo 3 = "3_String"
foo 4 = "4_String"
foo 5 = "5_String"
foo _ = "unknown_string"
```
We get a few things.
Obviously there are the ac...When we compile a function like this:
```
foo :: Int -> String
foo 1 = "1_String"
foo 2 = "2_String"
foo 3 = "3_String"
foo 4 = "4_String"
foo 5 = "5_String"
foo _ = "unknown_string"
```
We get a few things.
Obviously there are the actual strings:
```
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Foo.foo10 :: GHC.Prim.Addr#
Foo.foo10 = "1_String"#
```
There is no way around these so that's fine.
Then we end up with a function to unpack the actual string.
```
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Foo.foo9 :: [Char]
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,
WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Foo.foo9 = GHC.CString.unpackCString# Foo.foo10
```
We want to have a closure for each of these. Otherwise we end up constructing a new string each time, which would be a waste. So on the surface this is fine.
However we end up with one of these for each string.
Looking at the Cmm/Asm the functions are not THAT small.
```
[Foo.foo9_entry() // [R1]
{ info_tbls: [(c2hj,
label: Foo.foo9_info
rep: HeapRep static { Thunk }
srt: Nothing)]
stack_info: arg_space: 8 updfr_space: Just 8
}
{offset
c2hj: // global
if ((Sp + -16) < SpLim) (likely: False) goto c2hk; else goto c2hl;
c2hk: // global
R1 = R1;
call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
c2hl: // global
(_c2hg::I64) = call "ccall" arg hints: [PtrHint,
PtrHint] result hints: [PtrHint] newCAF(BaseReg, R1);
if (_c2hg::I64 == 0) goto c2hi; else goto c2hh;
c2hi: // global
call (I64[R1])() args: 8, res: 0, upd: 8;
c2hh: // global
I64[Sp - 16] = stg_bh_upd_frame_info;
I64[Sp - 8] = _c2hg::I64;
R2 = Foo.foo10_bytes;
Sp = Sp - 16;
call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
}
}
```
In actual code size (HEAD/-O2) the code + info table is about 100Byte.
To give an idea in my current ghc-stage2 I have 12,409 calls to unpackCString, and I assume 99% of them are from actual strings. So that comes out to about one megabyte. Out of a binary size of 84MB, so surprisingly significant actually!
## Now what can we do about this!
I think the right way to go here is to define a `unpackString` function which does the actual work.
Then we jump into that from a small per-string wrapper.
So we would end up with code like:
```
[Foo.foo9_entry() // [R1]
c2hj:
// R1 = Closure pointer
R2 = Foo.foo10_bytes;
call (unpackString)(R1,R2) args: 8, res: 0, upd: 8;
}
```
Which should be well under 50 bytes. It does cause an extra indirection when unpacking the String, but if the performance of that matters using String is likely the wrong choice to begin with.
How to actually get GHC to generate code like that I'm not sure yet.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Avoid unnecessary code duplication from String Literals.","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"When we compile a function like this:\r\n\r\n{{{\r\nfoo :: Int -> String\r\nfoo 1 = \"1_String\"\r\nfoo 2 = \"2_String\"\r\nfoo 3 = \"3_String\"\r\nfoo 4 = \"4_String\"\r\nfoo 5 = \"5_String\"\r\nfoo _ = \"unknown_string\"\r\n}}}\r\n\r\nWe get a few things.\r\n\r\nObviously there are the actual strings:\r\n{{{\r\n-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}\r\nFoo.foo10 :: GHC.Prim.Addr#\r\nFoo.foo10 = \"1_String\"#\r\n}}}\r\nThere is no way around these so that's fine.\r\n\r\nThen we end up with a function to unpack the actual string.\r\n{{{\r\n-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}\r\nFoo.foo9 :: [Char]\r\n[GblId,\r\n Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,\r\n WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]\r\nFoo.foo9 = GHC.CString.unpackCString# Foo.foo10\r\n}}}\r\nWe want to have a closure for each of these. Otherwise we end up constructing a new string each time, which would be a waste. So on the surface this is fine.\r\nHowever we end up with one of these for each string.\r\n\r\nLooking at the Cmm/Asm the functions are not THAT small.\r\n{{{\r\n[Foo.foo9_entry() // [R1]\r\n { info_tbls: [(c2hj,\r\n label: Foo.foo9_info\r\n rep: HeapRep static { Thunk }\r\n srt: Nothing)]\r\n stack_info: arg_space: 8 updfr_space: Just 8\r\n }\r\n {offset\r\n c2hj: // global\r\n if ((Sp + -16) < SpLim) (likely: False) goto c2hk; else goto c2hl;\r\n c2hk: // global\r\n R1 = R1;\r\n call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;\r\n c2hl: // global\r\n (_c2hg::I64) = call \"ccall\" arg hints: [PtrHint,\r\n PtrHint] result hints: [PtrHint] newCAF(BaseReg, R1);\r\n if (_c2hg::I64 == 0) goto c2hi; else goto c2hh;\r\n c2hi: // global\r\n call (I64[R1])() args: 8, res: 0, upd: 8;\r\n c2hh: // global\r\n I64[Sp - 16] = stg_bh_upd_frame_info;\r\n I64[Sp - 8] = _c2hg::I64;\r\n R2 = Foo.foo10_bytes;\r\n Sp = Sp - 16;\r\n call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;\r\n }\r\n }\r\n}}}\r\nIn actual code size (HEAD/-O2) the code + info table is about 100Byte.\r\n\r\nTo give an idea in my current ghc-stage2 I have 12,409 calls to unpackCString, and I assume 99% of them are from actual strings. So that comes out to about one megabyte. Out of a binary size of 84MB, so surprisingly significant actually!\r\n\r\n== Now what can we do about this!\r\n\r\nI think the right way to go here is to define a `unpackString` function which does the actual work.\r\nThen we jump into that from a small per-string wrapper.\r\n\r\nSo we would end up with code like:\r\n{{{\r\n[Foo.foo9_entry() // [R1]\r\n c2hj: \r\n // R1 = Closure pointer\r\n R2 = Foo.foo10_bytes;\r\n call (unpackString)(R1,R2) args: 8, res: 0, upd: 8;\r\n }\r\n}}}\r\n\r\nWhich should be well under 50 bytes. It does cause an extra indirection when unpacking the String, but if the performance of that matters using String is likely the wrong choice to begin with.\r\n\r\nHow to actually get GHC to generate code like that I'm not sure yet.\r\n\r\n\r\n\r\n\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->9.6.1Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/16013:kind! accepts unsaturated type aliases2019-07-07T18:02:01Zdmwit:kind! accepts unsaturated type aliasesHere's a ghci session:
```
> :set -XTypeFamilies -XPolyKinds
> type family Id (a :: k)
> type instance Id a = a
> type Foo x = Maybe
> :kind! Id Foo
Id Foo :: *
= Id Foo
```
I think the final `:kind!` query should throw an error instea...Here's a ghci session:
```
> :set -XTypeFamilies -XPolyKinds
> type family Id (a :: k)
> type instance Id a = a
> type Foo x = Maybe
> :kind! Id Foo
Id Foo :: *
= Id Foo
```
I think the final `:kind!` query should throw an error instead, complaining that `Foo` hasn't been given enough arguments. (But even if you disagree, and think it should be allowed, `*` is clearly not the right kind!)
Using a normal type alias in place of the type family for `Id` also allows the query incorrectly, though it does at least report a sensible kind.
Although I think it shouldn't matter, I have checked with `-ignore-dot-ghci` to make sure I haven't accidentally turned LiberalTypeSynonyms on.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":":kind! accepts unsaturated type aliases","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Here's a ghci session:\r\n\r\n{{{\r\n> :set -XTypeFamilies -XPolyKinds\r\n> type family Id (a :: k)\r\n> type instance Id a = a\r\n> type Foo x = Maybe\r\n> :kind! Id Foo\r\nId Foo :: *\r\n= Id Foo\r\n}}}\r\n\r\nI think the final `:kind!` query should throw an error instead, complaining that `Foo` hasn't been given enough arguments. (But even if you disagree, and think it should be allowed, `*` is clearly not the right kind!)\r\n\r\nUsing a normal type alias in place of the type family for `Id` also allows the query incorrectly, though it does at least report a sensible kind.\r\n\r\nAlthough I think it shouldn't matter, I have checked with `-ignore-dot-ghci` to make sure I haven't accidentally turned LiberalTypeSynonyms on.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/16012set/getAllocationCounter is broken in GHCi2020-07-21T15:28:13ZAndreas Klebingerset/getAllocationCounter is broken in GHCiIt doesn't seem obvious why it shouldn't work in GHCi, hence the report.
```
Prelude System.Mem> getAllocationCounter
9223372036854757447
Prelude System.Mem> setAllocationCounter 0
()
Prelude System.Mem> getAllocationCounter
92233720368...It doesn't seem obvious why it shouldn't work in GHCi, hence the report.
```
Prelude System.Mem> getAllocationCounter
9223372036854757447
Prelude System.Mem> setAllocationCounter 0
()
Prelude System.Mem> getAllocationCounter
9223372036854758855
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"set/getAllocationCounter is broken in GHCi","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"It doesn't seem obvious why it shouldn't work in GHCi, hence the report.\r\n\r\n{{{\r\nPrelude System.Mem> getAllocationCounter\r\n9223372036854757447\r\nPrelude System.Mem> setAllocationCounter 0\r\n()\r\nPrelude System.Mem> getAllocationCounter\r\n9223372036854758855\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->9.0.1Roland SennRoland Sennhttps://gitlab.haskell.org/ghc/ghc/-/issues/16011GHCi leaks memory even with -fno-it.2019-07-31T14:05:28ZAndreas KlebingerGHCi leaks memory even with -fno-it.GHCi leaks are not exactly new, but this one is especially easy to trigger/reproduce.
The memory allocated by f never gets freed.
```
PS E:\binary-perf> ..\ghc-8.6.1\bin\ghci.exe -fno-it
GHCi, version 8.6.1: http://www.haskell.org/ghc/...GHCi leaks are not exactly new, but this one is especially easy to trigger/reproduce.
The memory allocated by f never gets freed.
```
PS E:\binary-perf> ..\ghc-8.6.1\bin\ghci.exe -fno-it
GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help
Prelude> f = [1 .. 20000000] :: [Int]
Prelude> length f
20000000
Prelude> f = [1 .. 20000001] :: [Int]
Prelude> length f
20000001
Prelude> f = [1 .. 20000002] :: [Int]
Prelude> length f
20000002
Prelude> f = [1 .. 20000000] :: [Int]
Prelude> length f
20000000
Prelude>
```
Or using head and even simpler:
```
PS E:\binary-perf> ..\ghc_commonAsm\inplace\bin\ghci.exe -fno-it
GHCi, version 8.7.20181207: http://www.haskell.org/ghc/ :? for help
Loaded package environment from E:\binary-perf\.ghc.environment.x86_64-mingw32-8.7.20181207
Prelude> f = replicate 2000000 False
Prelude> length f
2000000
Prelude> f = replicate 2000000 False
Prelude> length f
2000000
Prelude> f = replicate 2000000 False
Prelude> length f
2000000
Prelude> f = replicate 2000000 False
Prelude> length f
```
GHC just keeps using more and more memory when I repeat this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHCi leaks memory even with -fno-it.","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"GHCi leaks are not exactly new, but this one is especially easy to trigger/reproduce.\r\n\r\nThe memory allocated by f never gets freed.\r\n{{{\r\nPS E:\\binary-perf> ..\\ghc-8.6.1\\bin\\ghci.exe -fno-it\r\nGHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help\r\nPrelude> f = [1 .. 20000000] :: [Int]\r\nPrelude> length f\r\n20000000\r\nPrelude> f = [1 .. 20000001] :: [Int]\r\nPrelude> length f\r\n20000001\r\nPrelude> f = [1 .. 20000002] :: [Int]\r\nPrelude> length f\r\n20000002\r\nPrelude> f = [1 .. 20000000] :: [Int]\r\nPrelude> length f\r\n20000000\r\nPrelude>\r\n}}}\r\n\r\nOr using head and even simpler:\r\n\r\n{{{\r\nPS E:\\binary-perf> ..\\ghc_commonAsm\\inplace\\bin\\ghci.exe -fno-it\r\nGHCi, version 8.7.20181207: http://www.haskell.org/ghc/ :? for help\r\nLoaded package environment from E:\\binary-perf\\.ghc.environment.x86_64-mingw32-8.7.20181207\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n2000000\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n2000000\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n2000000\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n}}}\r\n\r\nGHC just keeps using more and more memory when I repeat this.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/16010Broken Link in Data.OldList2019-07-07T18:02:02ZSven TennieBroken Link in Data.OldListIn `Data.OldList`:
```haskell
infix 5 \\ -- comment to fool cpp: https://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#cpp-string-gaps
```
Looks like the URL changed to: https://downloads.haskell.org/\~ghc/latest...In `Data.OldList`:
```haskell
infix 5 \\ -- comment to fool cpp: https://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#cpp-string-gaps
```
Looks like the URL changed to: https://downloads.haskell.org/\~ghc/latest/docs/html/users_guide/phases.html\#cpp-and-string-gaps
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.7 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | lowest |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Broken Link in Data.OldList","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"⊥","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"In `Data.OldList`:\r\n{{{\r\n#!haskell\r\ninfix 5 \\\\ -- comment to fool cpp: https://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#cpp-string-gaps\r\n}}}\r\n\r\nLooks like the URL changed to: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/phases.html#cpp-and-string-gaps","type_of_failure":"OtherFailure","blocking":[]} -->⊥Sven TennieSven Tenniehttps://gitlab.haskell.org/ghc/ghc/-/issues/16009Deprecate `optional` from Text.ParserCombinators.ReadP2020-01-23T19:38:55ZdbaynardDeprecate `optional` from Text.ParserCombinators.ReadPIt seems there is some disagreement on what the type of `optional` should be, within `base`.
`Control.Applicative` defines it as
```haskell
optional :: Alternative f => f a -> f (Maybe a)
```
By contrast, `Text.ParserCombinators.ReadP...It seems there is some disagreement on what the type of `optional` should be, within `base`.
`Control.Applicative` defines it as
```haskell
optional :: Alternative f => f a -> f (Maybe a)
```
By contrast, `Text.ParserCombinators.ReadP` defines it as
```haskell
optional :: ReadP a -> ReadP ()
```
Worse, ReadP implements `Alternative`. So it entirely possible to specialise
```haskell
optional :: ReadP a -> ReadP (Maybe a).
```
In the broader Haskell ecosystem (and beyond) there is further confusion. The `Applicative` definition is used by `parsers`, `megaparsec` and purescript's `Data.Maybe`. The `ReadP` definition is used by `Parsec` and purescript's `Text.Parsing.StringParser`. `Cabal`, like `base` defines both.
I propose to begin to deprecate `ReadP.optional` ASAP, following suggestions in https://www.reddit.com/r/haskell/comments/8cqgds/inconsistent_optional_definitions/. Code which used the old form may still compile; otherwise `void` should be applied.
There have been some suggestions for new names for the `ReadP` definition, such as `optionally` or `optional_`. It may be worth exporting this function directly from `Control.Applicative`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Deprecate `optional` from Text.ParserCombinators.ReadP","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":["Applicative,","Parsers,","ReadP"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"It seems there is some disagreement on what the type of `optional` should be, within `base`.\r\n\r\n`Control.Applicative` defines it as\r\n\r\n{{{#!haskell\r\noptional :: Alternative f => f a -> f (Maybe a)\r\n}}}\r\n\r\nBy contrast, `Text.ParserCombinators.ReadP` defines it as\r\n\r\n{{{#!haskell\r\noptional :: ReadP a -> ReadP ()\r\n}}}\r\n\r\nWorse, ReadP implements `Alternative`. So it entirely possible to specialise\r\n\r\n{{{#!haskell\r\noptional :: ReadP a -> ReadP (Maybe a).\r\n}}}\r\n\r\nIn the broader Haskell ecosystem (and beyond) there is further confusion. The `Applicative` definition is used by `parsers`, `megaparsec` and purescript's `Data.Maybe`. The `ReadP` definition is used by `Parsec` and purescript's `Text.Parsing.StringParser`. `Cabal`, like `base` defines both.\r\n\r\nI propose to begin to deprecate `ReadP.optional` ASAP, following suggestions in https://www.reddit.com/r/haskell/comments/8cqgds/inconsistent_optional_definitions/. Code which used the old form may still compile; otherwise `void` should be applied.\r\n\r\nThere have been some suggestions for new names for the `ReadP` definition, such as `optionally` or `optional_`. It may be worth exporting this function directly from `Control.Applicative`.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16008GHC HEAD type family regression involving invisible arguments2019-07-07T18:02:02ZRyan ScottGHC HEAD type family regression involving invisible argumentsThe following code compiles on GHC 8.0.2 through 8.6.2:
```hs
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
module Bug where
import Data.Kind
class C k where
type S :: k -> Type
data...The following code compiles on GHC 8.0.2 through 8.6.2:
```hs
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
module Bug where
import Data.Kind
class C k where
type S :: k -> Type
data D :: Type -> Type
data SD :: forall a. D a -> Type
instance C (D a) where
type S = SD
```
But fails to compile on GHC HEAD (commit 73cce63f33ee80f5095085141df9313ac70d1cfa):
```
$ ~/Software/ghc2/inplace/bin/ghc-stage2 Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:15:3: error:
• Type indexes must match class instance head
Expected: S @(D a)
Actual: S @(D a1)
• In the type instance declaration for ‘S’
In the instance declaration for ‘C (D a)’
|
15 | type S = SD
| ^^^^^^^^^^^
```
This regression prevents [the stitch library](https://cs.brynmawr.edu/~rae/papers/2018/stitch/stitch.tar.gz) from compiling.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 8.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC HEAD type family regression involving invisible arguments","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":["TypeFamilies,","TypeInType"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following code compiles on GHC 8.0.2 through 8.6.2:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\n{-# LANGUAGE TypeInType #-}\r\nmodule Bug where\r\n\r\nimport Data.Kind\r\n\r\nclass C k where\r\n type S :: k -> Type\r\n\r\ndata D :: Type -> Type\r\ndata SD :: forall a. D a -> Type\r\n\r\ninstance C (D a) where\r\n type S = SD\r\n}}}\r\n\r\nBut fails to compile on GHC HEAD (commit 73cce63f33ee80f5095085141df9313ac70d1cfa):\r\n\r\n{{{\r\n$ ~/Software/ghc2/inplace/bin/ghc-stage2 Bug.hs\r\n[1 of 1] Compiling Bug ( Bug.hs, Bug.o )\r\n\r\nBug.hs:15:3: error:\r\n • Type indexes must match class instance head\r\n Expected: S @(D a)\r\n Actual: S @(D a1)\r\n • In the type instance declaration for ‘S’\r\n In the instance declaration for ‘C (D a)’\r\n |\r\n15 | type S = SD\r\n | ^^^^^^^^^^^\r\n}}}\r\n\r\nThis regression prevents [https://cs.brynmawr.edu/~rae/papers/2018/stitch/stitch.tar.gz the stitch library] from compiling.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/16007Implement `-Os`2019-07-07T18:02:03ZSebastian GrafImplement `-Os`Popular C compilers like GCC or clang allow to optimise for binary size.
Since there are multiple ways in which GHC trades code size for faster programs, it might make sense to follow suit. This ticket is for tracking which optimisation...Popular C compilers like GCC or clang allow to optimise for binary size.
Since there are multiple ways in which GHC trades code size for faster programs, it might make sense to follow suit. This ticket is for tracking which optimisations/hacks in the compiler might be affected.
Feel free to add items to the following list:
- potentially huge impact due to specialisation, liberate case and inlining
- potential of -0.9% due to a second run of common block elimination (#14226)
- +0.1% increase in code size due to known calls instead of re-using generic apply thunks in #16005
- -0.1% due to `-fstg-lift-lams` #9476⊥https://gitlab.haskell.org/ghc/ghc/-/issues/16006Framework failures when validating2019-07-07T18:02:03ZÖmer Sinan AğacanFramework failures when validatingI just tried to validate and got this:
```
Framework failures:
. ./perf/should_run/all.T [] (name 'stats_num_field' is not defined)
```
Tree based on fb669f51b3f2cae79511ac3d1c43939d951b1f69.
<details><summary>Trac metadata</summa...I just tried to validate and got this:
```
Framework failures:
. ./perf/should_run/all.T [] (name 'stats_num_field' is not defined)
```
Tree based on fb669f51b3f2cae79511ac3d1c43939d951b1f69.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Test Suite |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Framework failures when validating","status":"New","operating_system":"","component":"Test Suite","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I just tried to validate and got this:\r\n\r\n{{{\r\nFramework failures:\r\n . ./perf/should_run/all.T [] (name 'stats_num_field' is not defined)\r\n}}}\r\n\r\nTree based on fb669f51b3f2cae79511ac3d1c43939d951b1f69.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1