GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:00:42Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/16276Feature request: Polymorphic kinds in Data.Functor.Classes2019-07-07T18:00:42ZLangston BarrettFeature request: Polymorphic kinds in Data.Functor.ClassesThe classes in Data.Functor.Classes have a somewhat restrictive kind signature:
```
*Data.Functor.Classes> :k Eq1
Eq1 :: (* -> *) ...The classes in Data.Functor.Classes have a somewhat restrictive kind signature:
```
*Data.Functor.Classes> :k Eq1
Eq1 :: (* -> *) -> Constraint
```
As a result, we redefine \[1\] many of them in the [parameterized-utils](https://hackage.haskell.org/package/parameterized-utils-1.0.1/docs/Data-Parameterized-Classes.html) library. It would be quite easy to make more polymorphic (have kind "(k -\> \*) -\> Constraint"). If everyone thinks this is a good idea, I'm happy to submit a pull request.
\[1\]: To be precise, there are actually a few axes along which the classes in parameterized-utils vary from those in base. Some, like OrdF, require more type-level evidence. Others, like EqF, don't require their type parameter to have the corresponding instance. There are a lot of points in the design space here.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.3 |
| 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":"Feature request: Polymorphic kinds in Data.Functor.Classes","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["polykinds"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"The classes in Data.Functor.Classes have a somewhat restrictive kind signature:\r\n{{{\r\n*Data.Functor.Classes> :k Eq1 \r\nEq1 :: (* -> *) -> Constraint \r\n}}}\r\n\r\nAs a result, we redefine [1] many of them in the [https://hackage.haskell.org/package/parameterized-utils-1.0.1/docs/Data-Parameterized-Classes.html parameterized-utils] library. It would be quite easy to make more polymorphic (have kind \"(k -> *) -> Constraint\"). If everyone thinks this is a good idea, I'm happy to submit a pull request. \r\n\r\n[1]: To be precise, there are actually a few axes along which the classes in parameterized-utils vary from those in base. Some, like OrdF, require more type-level evidence. Others, like EqF, don't require their type parameter to have the corresponding instance. There are a lot of points in the design space here. ","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16275type hole in hs-boot file triggers GHC internal error2019-07-07T18:00:43Zwaldmann@imn.htwk-leipzig.detype hole in hs-boot file triggers GHC internal errorPut each line in a separate file, the last one is B.hs-boot
```
module A where { import {-# SOURCE #-} B }
module B where { }
module B where { data T a ; foo :: T _ }
```
then
```
$ ghci A.hs
GHCi, version 8.6.3: http://www.haskel...Put each line in a separate file, the last one is B.hs-boot
```
module A where { import {-# SOURCE #-} B }
module B where { }
module B where { data T a ; foo :: T _ }
```
then
```
$ ghci A.hs
GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help
[1 of 3] Compiling B[boot] ( B.hs-boot, interpreted )
B.hs-boot:1:38: error:
• GHC internal error: ‘_’ is not in scope during type checking, but it passed the renamer
tcl_env of environment: []
• In the first argument of ‘T’, namely ‘_’
In the type signature: foo :: T _
|
1 | module B where { data T a ; foo :: T _ }
| ^
```
I know the program is invalid (the hole has no valid instance) but still it should not produce an internal error?
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"type hole in hs-boot file triggers GHC internal error","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Put each line in a separate file, the last one is B.hs-boot\r\n{{{\r\nmodule A where { import {-# SOURCE #-} B }\r\n\r\nmodule B where { }\r\n\r\nmodule B where { data T a ; foo :: T _ }\r\n}}}\r\nthen\r\n{{{\r\n$ ghci A.hs \r\n\r\nGHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help\r\n[1 of 3] Compiling B[boot] ( B.hs-boot, interpreted )\r\n\r\nB.hs-boot:1:38: error:\r\n • GHC internal error: ‘_’ is not in scope during type checking, but it passed the renamer\r\n tcl_env of environment: []\r\n • In the first argument of ‘T’, namely ‘_’\r\n In the type signature: foo :: T _\r\n |\r\n1 | module B where { data T a ; foo :: T _ }\r\n | ^\r\n}}}\r\nI know the program is invalid (the hole has no valid instance) but still it should not produce an internal error?\r\n\r\n\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16274Remove ghctags2019-07-07T18:00:43ZArtem PelenitsynRemove ghctagsThis was suggested by Ben in the ghc-devs list. Does anyone desire to preserve it?
As a newcomer, I think the existence of dead tools adds confusion. I didn't know what to peek at some point (try make etags work / hasktags / ghctags).
...This was suggested by Ben in the ghc-devs list. Does anyone desire to preserve it?
As a newcomer, I think the existence of dead tools adds confusion. I didn't know what to peek at some point (try make etags work / hasktags / ghctags).
I tentatively mark this as a newcomer task.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.3 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Remove ghctags","status":"New","operating_system":"","component":"None","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["newcomer"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"This was suggested by Ben in the ghc-devs list. Does anyone desire to preserve it?\r\n\r\nAs a newcomer, I think the existence of dead tools adds confusion. I didn't know what to peek at some point (try make etags work / hasktags / ghctags).\r\n\r\nI tentatively mark this as a newcomer task.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/16273Hadrian turns on `-Wno-unused-imports` for text when using integer-simple2021-04-30T11:16:49ZMatthew PickeringHadrian turns on `-Wno-unused-imports` for text when using integer-simpleIn `Settings.Warnings`, hadrian turns on `-Wno-unused-imports` for the `text` package when building with `integer-simple`.
It would be good to fix `text` so we can remove this special case.
1. Build GHC with `integer-simple` and `-Werr...In `Settings.Warnings`, hadrian turns on `-Wno-unused-imports` for the `text` package when building with `integer-simple`.
It would be good to fix `text` so we can remove this special case.
1. Build GHC with `integer-simple` and `-Werror`
1. Remove the special case for `text` in `Settings.Warnings`.
1. Fix the warnings in `text` appropriately so the build finishes.
1. Push the fix upstream and then update the submodule.
This could also be debugged without having to build ghc by downloading an [integer-simple bindist](https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/download?job=validate-x86_64-linux-deb9-integer-simple).
Also see: https://github.com/haskell/text/issues/250
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hadrian turns on `-Wno-unused-imports` for text when using integer-simple","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["newcomer"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In `Settings.Warnings`, hadrian turns on `-Wno-unused-imports` for the `text` package when building with `integer-simple`. \r\n\r\nIt would be good to fix `text` so we can remove this special case.\r\n\r\n1. Build GHC with `integer-simple` and `-Werror`\r\n2. Remove the special case for `text` in `Settings.Warnings`.\r\n3. Fix the warnings in `text` appropriately so the build finishes. \r\n4. Push the fix upstream and then update the submodule.\r\n\r\nThis could also be debugged without having to build ghc by downloading an [https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/download?job=validate-x86_64-linux-deb9-integer-simple integer-simple bindist].\r\n\r\n\r\nAlso see: https://github.com/haskell/text/issues/250","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16272libffi copies files into rts build tree2019-07-07T18:00:43ZMatthew Pickeringlibffi copies files into rts build treeThe `rts` should explicitly depend on `ffi.h` and `ffitarget.h`, then use this path to copy in these two header files itself rather than relying on the libffi build rule to copy them into the `rts/build` directory.
You can see this happ...The `rts` should explicitly depend on `ffi.h` and `ffitarget.h`, then use this path to copy in these two header files itself rather than relying on the libffi build rule to copy them into the `rts/build` directory.
You can see this happening in `Rules.Libffi.libffiRules`
This often results in a failure where the `rts` rule will fail to produce these files after deleting build products in `_build`.
```
shakeArgsWith 0.000s 0%
Function shake 0.006s 0%
Database read 1.051s 0%
Database compression 0.146s 0%
With database 0.031s 0%
Running rules 121.010s 98% =========================
Total 122.244s 100%
Error when running Shake build system:
at src/Main.hs:58:30-42:
* Depends on: stage1:lib:text
at src/Rules/SimpleTargets.hs:31:5-15:
* Depends on: integersimple/stage1/lib/package.conf.d/text-1.2.3.1.conf
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "text", pkgPath = "libraries/text"}, way = v}))
* Depends on: integersimple/stage1/libraries/text/setup-config
* Depends on: integersimple/stage1/lib/package.conf.d/base-4.12.0.0.conf
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "base", pkgPath = "libraries/base"}, way = v}))
* Depends on: integersimple/stage1/libraries/base/setup-config
* Depends on: integersimple/stage1/lib/package.conf.d/rts-1.0.conf
* Depends on: integersimple/stage1/rts/build/libHSrts-1.0_thr_l.a
* Depends on: integersimple/stage1/rts/build/c/Interpreter.thr_l_o
* Depends on: integersimple/stage1/rts/build/ffi.h
* Depends on: integersimple/stage1/rts/build/ffi.h integersimple/stage1/rts/build/ffitarget.h
* Raised the exception:
Error, &%> rule failed to produce 2 files (out of 2)
integersimple/stage1/rts/build/ffi.h - MISSING
integersimple/stage1/rts/build/ffitarget.h - MISSING
CallStack (from HasCallStack):
error, called at src/Development/Shake/Internal/Rules/Files.hs:245:13 in shake-0.17.2-586622e6ae1d899ec790b1028cae3413c00a616f124bac634769a9607581e631:Development.Shake.Internal.Rules.Files
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"libffi copies files into rts build tree","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The `rts` should explicitly depend on `ffi.h` and `ffitarget.h`, then use this path to copy in these two header files itself rather than relying on the libffi build rule to copy them into the `rts/build` directory.\r\n\r\nYou can see this happening in `Rules.Libffi.libffiRules`\r\n\r\nThis often results in a failure where the `rts` rule will fail to produce these files after deleting build products in `_build`. \r\n\r\n{{{\r\nshakeArgsWith 0.000s 0% \r\nFunction shake 0.006s 0% \r\nDatabase read 1.051s 0% \r\nDatabase compression 0.146s 0% \r\nWith database 0.031s 0% \r\nRunning rules 121.010s 98% =========================\r\nTotal 122.244s 100% \r\nError when running Shake build system:\r\n at src/Main.hs:58:30-42:\r\n* Depends on: stage1:lib:text\r\n at src/Rules/SimpleTargets.hs:31:5-15:\r\n* Depends on: integersimple/stage1/lib/package.conf.d/text-1.2.3.1.conf\r\n* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = \"text\", pkgPath = \"libraries/text\"}, way = v}))\r\n* Depends on: integersimple/stage1/libraries/text/setup-config\r\n* Depends on: integersimple/stage1/lib/package.conf.d/base-4.12.0.0.conf\r\n* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = \"base\", pkgPath = \"libraries/base\"}, way = v}))\r\n* Depends on: integersimple/stage1/libraries/base/setup-config\r\n* Depends on: integersimple/stage1/lib/package.conf.d/rts-1.0.conf\r\n* Depends on: integersimple/stage1/rts/build/libHSrts-1.0_thr_l.a\r\n* Depends on: integersimple/stage1/rts/build/c/Interpreter.thr_l_o\r\n* Depends on: integersimple/stage1/rts/build/ffi.h\r\n* Depends on: integersimple/stage1/rts/build/ffi.h integersimple/stage1/rts/build/ffitarget.h\r\n* Raised the exception:\r\nError, &%> rule failed to produce 2 files (out of 2)\r\n integersimple/stage1/rts/build/ffi.h - MISSING\r\n integersimple/stage1/rts/build/ffitarget.h - MISSING\r\nCallStack (from HasCallStack):\r\n error, called at src/Development/Shake/Internal/Rules/Files.hs:245:13 in shake-0.17.2-586622e6ae1d899ec790b1028cae3413c00a616f124bac634769a9607581e631:Development.Shake.Internal.Rules.Files\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16271Building stage1:lib:text target is not robust2019-07-07T18:00:44ZMatthew PickeringBuilding stage1:lib:text target is not robustIt seems the dependency on `cabal_macros.h` is not properly specified in the logic to build the libraries.
If I start a build, build a library and then remove the library dir, the target fails to build.
```
./hadrian/build.sh stage1:li...It seems the dependency on `cabal_macros.h` is not properly specified in the logic to build the libraries.
If I start a build, build a library and then remove the library dir, the target fails to build.
```
./hadrian/build.sh stage1:lib:text
rm -r _build/stage1/
./hadrian/build.sh stage1:lib:text
```
```
cc1: fatal error: integersimple/stage1/libraries/text/build/autogen/cabal_macros.h: No such file or directory
compilation terminated.
`cc' failed in phase `C pre-processor'. (Exit code: 1)
shakeArgsWith 0.000s 0%
Function shake 0.006s 0%
Database read 0.831s 23% ========
With database 0.100s 2%
Running rules 2.545s 73% =========================
Total 3.482s 100%
Error when running Shake build system:
at src/Main.hs:58:30-42:
* Depends on: stage1:lib:text
at src/Rules/SimpleTargets.hs:31:5-15:
* Depends on: integersimple/stage1/lib/package.conf.d/text-1.2.3.1.conf
* Depends on: integersimple/stage1/libraries/text/build/libHStext-1.2.3.1.a
* Depends on: integersimple/stage1/libraries/text/build/Data/Text/Show.o
* Depends on: OracleQ (KeyValues ("integersimple/stage1/libraries/text/.dependencies","integersimple/stage1/libraries/text/build/Data/Text/Show.o"))
* Depends on: integersimple/stage1/libraries/text/.dependencies
* Depends on: integersimple/stage1/libraries/text/.dependencies.mk
* Raised the exception:
user error (Development.Shake.cmd, system command failed
Command: integersimple/stage0/bin/ghc -M -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-db integersimple/stage1/lib/package.conf.d' '-this-unit-id text-1.2.3.1' '-package-id array-0.5.2.0' '-package-id base-4.12.0.0' '-package-id binary-0.8.6.0' '-package-id bytestring-0.10.9.0' '-package-id deepseq-1.4.4.0' '-package-id ghc-prim-0.5.3' '-package-id integer-simple-0.1.1.1' -i -iintegersimple/stage1/libraries/text/build -iintegersimple/stage1/libraries/text/build/autogen -ilibraries/text/. -Iincludes -Iintegersimple/generated -Iintegersimple/stage1/libraries/text/build -I/nix/store/f97ls1qx6vxf75304874843ysdcyimnn-ghc-build-environment/include -Iintegersimple/stage1/libraries/text/build/include -Ilibraries/text/include -I/root/ghc/integersimple/stage1/lib/x86_64-linux-ghc-8.7.20190124/bytestring-0.10.9.0/include -I/root/ghc/integersimple/stage1/lib/x86_64-linux-ghc-8.7.20190124/base-4.12.0.0/include -I/root/ghc/integersimple/stage1/lib/x86_64-linux-ghc-8.7.20190124/rts-1.0/include -Iintegersimple/generated -optc-Iintegersimple/generated -optP-include -optPintegersimple/stage1/libraries/text/build/autogen/cabal_macros.h -optP-DINTEGER_SIMPLE -outputdir integersimple/stage1/libraries/text/build -include-pkg-deps -dep-makefile integersimple/stage1/libraries/text/.dependencies.mk -dep-suffix '' -dep-suffix dyn_ libraries/text/Data/Text.hs libraries/text/Data/Text/Array.hs libraries/text/Data/Text/Encoding.hs libraries/text/Data/Text/Encoding/Error.hs libraries/text/Data/Text/Foreign.hs libraries/text/Data/Text/IO.hs libraries/text/Data/Text/Internal.hs libraries/text/Data/Text/Internal/Builder.hs libraries/text/Data/Text/Internal/Builder/Functions.hs libraries/text/Data/Text/Internal/Builder/Int/Digits.hs libraries/text/Data/Text/Internal/Builder/RealFloat/Functions.hs libraries/text/Data/Text/Internal/Encoding/Fusion.hs libraries/text/Data/Text/Internal/Encoding/Fusion/Common.hs libraries/text/Data/Text/Internal/Encoding/Utf16.hs libraries/text/Data/Text/Internal/Encoding/Utf32.hs libraries/text/Data/Text/Internal/Encoding/Utf8.hs libraries/text/Data/Text/Internal/Functions.hs libraries/text/Data/Text/Internal/Fusion.hs libraries/text/Data/Text/Internal/Fusion/CaseMapping.hs libraries/text/Data/Text/Internal/Fusion/Common.hs libraries/text/Data/Text/Internal/Fusion/Size.hs libraries/text/Data/Text/Internal/Fusion/Types.hs libraries/text/Data/Text/Internal/IO.hs libraries/text/Data/Text/Internal/Lazy.hs libraries/text/Data/Text/Internal/Lazy/Encoding/Fusion.hs libraries/text/Data/Text/Internal/Lazy/Fusion.hs libraries/text/Data/Text/Internal/Lazy/Search.hs libraries/text/Data/Text/Internal/Private.hs libraries/text/Data/Text/Internal/Read.hs libraries/text/Data/Text/Internal/Search.hs libraries/text/Data/Text/Internal/Unsafe.hs libraries/text/Data/Text/Internal/Unsafe/Char.hs libraries/text/Data/Text/Internal/Unsafe/Shift.hs libraries/text/Data/Text/Lazy.hs libraries/text/Data/Text/Lazy/Builder.hs libraries/text/Data/Text/Lazy/Builder/Int.hs libraries/text/Data/Text/Lazy/Builder/RealFloat.hs libraries/text/Data/Text/Lazy/Encoding.hs libraries/text/Data/Text/Lazy/IO.hs libraries/text/Data/Text/Lazy/Internal.hs libraries/text/Data/Text/Lazy/Read.hs libraries/text/Data/Text/Read.hs libraries/text/Data/Text/Show.hs libraries/text/Data/Text/Unsafe.hs -O0 -H64m -Wall -fwarn-tabs -funbox-strict-fields -O2 -XHaskell98 -ghcversion-file=/root/ghc/integersimple/generated/ghcversion.h -O -Wno-deprecated-flags -Wno-unused-imports -Werror
Exit code: 1
Stderr:
cc1: fatal error: integersimple/stage1/libraries/text/build/autogen/cabal_macros.h: No such file or directory
compilation terminated.
`cc' failed in phase `C pre-processor'. (Exit code: 1)
)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Building stage1:lib:text target is not robust","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"It seems the dependency on `cabal_macros.h` is not properly specified in the logic to build the libraries. \r\n\r\nIf I start a build, build a library and then remove the library dir, the target fails to build.\r\n\r\n{{{\r\n./hadrian/build.sh stage1:lib:text\r\nrm -r _build/stage1/\r\n./hadrian/build.sh stage1:lib:text\r\n}}}\r\n\r\n\r\n{{{\r\ncc1: fatal error: integersimple/stage1/libraries/text/build/autogen/cabal_macros.h: No such file or directory\r\ncompilation terminated.\r\n`cc' failed in phase `C pre-processor'. (Exit code: 1)\r\nshakeArgsWith 0.000s 0% \r\nFunction shake 0.006s 0% \r\nDatabase read 0.831s 23% ======== \r\nWith database 0.100s 2% \r\nRunning rules 2.545s 73% =========================\r\nTotal 3.482s 100% \r\nError when running Shake build system:\r\n at src/Main.hs:58:30-42:\r\n* Depends on: stage1:lib:text\r\n at src/Rules/SimpleTargets.hs:31:5-15:\r\n* Depends on: integersimple/stage1/lib/package.conf.d/text-1.2.3.1.conf\r\n* Depends on: integersimple/stage1/libraries/text/build/libHStext-1.2.3.1.a\r\n* Depends on: integersimple/stage1/libraries/text/build/Data/Text/Show.o\r\n* Depends on: OracleQ (KeyValues (\"integersimple/stage1/libraries/text/.dependencies\",\"integersimple/stage1/libraries/text/build/Data/Text/Show.o\"))\r\n* Depends on: integersimple/stage1/libraries/text/.dependencies\r\n* Depends on: integersimple/stage1/libraries/text/.dependencies.mk\r\n* Raised the exception:\r\nuser error (Development.Shake.cmd, system command failed\r\nCommand: integersimple/stage0/bin/ghc -M -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-db integersimple/stage1/lib/package.conf.d' '-this-unit-id text-1.2.3.1' '-package-id array-0.5.2.0' '-package-id base-4.12.0.0' '-package-id binary-0.8.6.0' '-package-id bytestring-0.10.9.0' '-package-id deepseq-1.4.4.0' '-package-id ghc-prim-0.5.3' '-package-id integer-simple-0.1.1.1' -i -iintegersimple/stage1/libraries/text/build -iintegersimple/stage1/libraries/text/build/autogen -ilibraries/text/. -Iincludes -Iintegersimple/generated -Iintegersimple/stage1/libraries/text/build -I/nix/store/f97ls1qx6vxf75304874843ysdcyimnn-ghc-build-environment/include -Iintegersimple/stage1/libraries/text/build/include -Ilibraries/text/include -I/root/ghc/integersimple/stage1/lib/x86_64-linux-ghc-8.7.20190124/bytestring-0.10.9.0/include -I/root/ghc/integersimple/stage1/lib/x86_64-linux-ghc-8.7.20190124/base-4.12.0.0/include -I/root/ghc/integersimple/stage1/lib/x86_64-linux-ghc-8.7.20190124/rts-1.0/include -Iintegersimple/generated -optc-Iintegersimple/generated -optP-include -optPintegersimple/stage1/libraries/text/build/autogen/cabal_macros.h -optP-DINTEGER_SIMPLE -outputdir integersimple/stage1/libraries/text/build -include-pkg-deps -dep-makefile integersimple/stage1/libraries/text/.dependencies.mk -dep-suffix '' -dep-suffix dyn_ libraries/text/Data/Text.hs libraries/text/Data/Text/Array.hs libraries/text/Data/Text/Encoding.hs libraries/text/Data/Text/Encoding/Error.hs libraries/text/Data/Text/Foreign.hs libraries/text/Data/Text/IO.hs libraries/text/Data/Text/Internal.hs libraries/text/Data/Text/Internal/Builder.hs libraries/text/Data/Text/Internal/Builder/Functions.hs libraries/text/Data/Text/Internal/Builder/Int/Digits.hs libraries/text/Data/Text/Internal/Builder/RealFloat/Functions.hs libraries/text/Data/Text/Internal/Encoding/Fusion.hs libraries/text/Data/Text/Internal/Encoding/Fusion/Common.hs libraries/text/Data/Text/Internal/Encoding/Utf16.hs libraries/text/Data/Text/Internal/Encoding/Utf32.hs libraries/text/Data/Text/Internal/Encoding/Utf8.hs libraries/text/Data/Text/Internal/Functions.hs libraries/text/Data/Text/Internal/Fusion.hs libraries/text/Data/Text/Internal/Fusion/CaseMapping.hs libraries/text/Data/Text/Internal/Fusion/Common.hs libraries/text/Data/Text/Internal/Fusion/Size.hs libraries/text/Data/Text/Internal/Fusion/Types.hs libraries/text/Data/Text/Internal/IO.hs libraries/text/Data/Text/Internal/Lazy.hs libraries/text/Data/Text/Internal/Lazy/Encoding/Fusion.hs libraries/text/Data/Text/Internal/Lazy/Fusion.hs libraries/text/Data/Text/Internal/Lazy/Search.hs libraries/text/Data/Text/Internal/Private.hs libraries/text/Data/Text/Internal/Read.hs libraries/text/Data/Text/Internal/Search.hs libraries/text/Data/Text/Internal/Unsafe.hs libraries/text/Data/Text/Internal/Unsafe/Char.hs libraries/text/Data/Text/Internal/Unsafe/Shift.hs libraries/text/Data/Text/Lazy.hs libraries/text/Data/Text/Lazy/Builder.hs libraries/text/Data/Text/Lazy/Builder/Int.hs libraries/text/Data/Text/Lazy/Builder/RealFloat.hs libraries/text/Data/Text/Lazy/Encoding.hs libraries/text/Data/Text/Lazy/IO.hs libraries/text/Data/Text/Lazy/Internal.hs libraries/text/Data/Text/Lazy/Read.hs libraries/text/Data/Text/Read.hs libraries/text/Data/Text/Show.hs libraries/text/Data/Text/Unsafe.hs -O0 -H64m -Wall -fwarn-tabs -funbox-strict-fields -O2 -XHaskell98 -ghcversion-file=/root/ghc/integersimple/generated/ghcversion.h -O -Wno-deprecated-flags -Wno-unused-imports -Werror\r\nExit code: 1\r\nStderr:\r\ncc1: fatal error: integersimple/stage1/libraries/text/build/autogen/cabal_macros.h: No such file or directory\r\ncompilation terminated.\r\n`cc' failed in phase `C pre-processor'. (Exit code: 1)\r\n)\r\n\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16270Report multiple errors during parsing2019-07-07T18:00:44ZVladislav ZavialovReport multiple errors during parsingParsing failures currently abort the parsing process (with `parseErrorSDoc`) even if it can continue and report multiple errors at once.
This is easy to fix by creating a new combinator, `addError`, similar to `addWarning`, which would ...Parsing failures currently abort the parsing process (with `parseErrorSDoc`) even if it can continue and report multiple errors at once.
This is easy to fix by creating a new combinator, `addError`, similar to `addWarning`, which would add the error message to the accumulator but continue parsing.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 8.6.3 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Report multiple errors during parsing","status":"New","operating_system":"","component":"Compiler (Parser)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Parsing failures currently abort the parsing process (with `parseErrorSDoc`) even if it can continue and report multiple errors at once.\r\n\r\nThis is easy to fix by creating a new combinator, `addError`, similar to `addWarning`, which would add the error message to the accumulator but continue parsing.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16269Postfix operator precedence2019-07-07T18:00:44ZanuytsPostfix operator precedenceI want to define a postfix operator $- that feeds a default argument (obtained from a typeclass) to a given function. However, I would like to be able to write things like (f $ g $ h $-) for (f (g (h (defaultArg)))). This is not allowed,...I want to define a postfix operator $- that feeds a default argument (obtained from a typeclass) to a given function. However, I would like to be able to write things like (f $ g $ h $-) for (f (g (h (defaultArg)))). This is not allowed, as $ has precedence 0 and $- is required to have lower precedence, which is impossible. I think it would be sensible if $- was required to have precedence at most infixr 0 (which is the precedence of $).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 8.0.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Postfix operator precedence","status":"New","operating_system":"","component":"Compiler (Parser)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.2","keywords":["PostfixOperators","fixity"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"I want to define a postfix operator $- that feeds a default argument (obtained from a typeclass) to a given function. However, I would like to be able to write things like (f $ g $ h $-) for (f (g (h (defaultArg)))). This is not allowed, as $ has precedence 0 and $- is required to have lower precedence, which is impossible. I think it would be sensible if $- was required to have precedence at most infixr 0 (which is the precedence of $).","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16268Potential race condition in Hadrian?2019-07-07T18:00:44ZMatthew PickeringPotential race condition in Hadrian?It seems that sometimes CI jobs fail because of a race condition in Hadrian.
https://gitlab.haskell.org/ghc/ghc/-/jobs/20254
Here, array finishes before `deepseq` starts to be built but the configure step for `deepseq` fails to find th...It seems that sometimes CI jobs fail because of a race condition in Hadrian.
https://gitlab.haskell.org/ghc/ghc/-/jobs/20254
Here, array finishes before `deepseq` starts to be built but the configure step for `deepseq` fails to find the library.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Potential race condition in Hadrian?","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"It seems that sometimes CI jobs fail because of a race condition in Hadrian.\r\n\r\nhttps://gitlab.haskell.org/ghc/ghc/-/jobs/20254\r\n\r\nHere, array finishes before `deepseq` starts to be built but the configure step for `deepseq` fails to find the library.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16267EXTRA_HC_OPTS workflow under hadrian.2020-01-05T17:40:44ZAndreas KlebingerEXTRA_HC_OPTS workflow under hadrian.This allows passing of arbitrary flags to ghc from the command line.
The main use case for me so far is to generate dumps for an arbitrary combination of dump flags.
Sometimes I wanted to look at the simplifier output for a certain fil...This allows passing of arbitrary flags to ghc from the command line.
The main use case for me so far is to generate dumps for an arbitrary combination of dump flags.
Sometimes I wanted to look at the simplifier output for a certain file.
Sometimes I wanted to dump the asm code for all files to see how common certain patterns are. Sometimes the same for Cmm. Sometimes I want to dump two passes to be able to cross reference between them.
These are usually on-off things and the exact flags often differ. So imo custom build profiles are not a good solution for this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"EXTRA_HC_OPTS workflow under hadrian.","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"This allows passing of arbitrary flags to ghc from the command line.\r\n\r\nThe main use case for me so far is to generate dumps for an arbitrary combination of dump flags.\r\n\r\nSometimes I wanted to look at the simplifier output for a certain file.\r\n\r\nSometimes I wanted to dump the asm code for all files to see how common certain patterns are. Sometimes the same for Cmm. Sometimes I want to dump two passes to be able to cross reference between them.\r\n\r\nThese are usually on-off things and the exact flags often differ. So imo custom build profiles are not a good solution for this.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->Make removalhttps://gitlab.haskell.org/ghc/ghc/-/issues/16266Allow definition of functions with absurd contexts2019-11-06T16:20:33ZSo8resAllow definition of functions with absurd contextsConsider the following code:
```hs
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# ...Consider the following code:
```hs
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
type family Head xxs where
Head (x ': xs) = x
type family Tail xxs where
Tail (x ': xs) = xs
class IsList xs where
isList :: (xs ~ '[] => r) -> ((xs ~ (Head xs ': Tail xs), IsList (Tail xs)) => r) -> r
instance IsList '[] where isList r _ = r
instance IsList xs => IsList (x ': xs) where isList _ r = r
nonEmptyListsAreNotEmpty :: (xs ~ '[], xs ~ (Head xs ': Tail xs)) => r
nonEmptyListsAreNotEmpty = error "you convinced GHC that '[] ~ (_ ': _)!"
sillyExample :: forall x xs. IsList (x ': xs) => ()
sillyExample = isList @(x ': xs) nonEmptyListsAreNotEmpty ()
```
In this code, we define a class IsList which serves as a proof that something is a type-level list, via the function isList. When using this, we may occasionally get into a situation where the types guarantee that we're working with a non-empty list, but we're asked to handle the empty-list case anyway. Suppose we want to define a nice little "absurd" function that serves as a reminder to readers that this code branch is impossible, in a way that GHC can verify. This function is named "nonEmptyListsAreNonEmpty" above.
Unfortunately, this code fails with
```
Main.hs:25:34: error:
• Couldn't match type ‘'[]’ with ‘Head '[] : Tail '[]’
arising from a use of ‘nonEmptyListsAreNotEmpty’
• In the second argument of ‘isList’, namely
‘nonEmptyListsAreNotEmpty’
In the expression: isList @(x : xs) nonEmptyListsAreNotEmpty ()
In an equation for ‘sillyExample’:
sillyExample = isList @(x : xs) nonEmptyListsAreNotEmpty ()
|
25 | sillyExample = isList @(x ': xs) nonEmptyListsAreNotEmpty ()
| ^^^^^^^^^^^^^^^^^^^^^^^^
```
And indeed, the fact that \[\] can't be matched against (_ : _) is in some sense the point. More generally, whenever I'm fooling around with this sort of Haskell code (in which classes are being used to provide runtime witnesses of type-level structure), I relatively regularly find myself in a branch of code where the context is obviously inconsistent, wishing that I had some way to say "search your heart, GHC; you know this case to be impossible". The fact that I can't even factor out this dead code into a function like nonEmptyListsAreNonEmpty just seems like insult added to injury.
This is a minor concern, to be sure. Nevertheless, it seems to me that we should be able to write this function somehow, especially given that there are various ways to trick GHC into accepting something analogous (by clever use of GADTs such as :\~:, perhaps).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.3 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Allow definition of functions with absurd contexts","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Consider the following code:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE AllowAmbiguousTypes #-}\r\n{-# LANGUAGE DataKinds #-}\r\n{-# LANGUAGE FlexibleContexts #-}\r\n{-# LANGUAGE RankNTypes #-}\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\n{-# LANGUAGE TypeApplications #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\n{-# LANGUAGE TypeOperators #-}\r\ntype family Head xxs where\r\n Head (x ': xs) = x\r\n\r\ntype family Tail xxs where\r\n Tail (x ': xs) = xs\r\n\r\nclass IsList xs where\r\n isList :: (xs ~ '[] => r) -> ((xs ~ (Head xs ': Tail xs), IsList (Tail xs)) => r) -> r\r\n\r\ninstance IsList '[] where isList r _ = r\r\ninstance IsList xs => IsList (x ': xs) where isList _ r = r\r\n\r\nnonEmptyListsAreNotEmpty :: (xs ~ '[], xs ~ (Head xs ': Tail xs)) => r\r\nnonEmptyListsAreNotEmpty = error \"you convinced GHC that '[] ~ (_ ': _)!\"\r\n\r\nsillyExample :: forall x xs. IsList (x ': xs) => ()\r\nsillyExample = isList @(x ': xs) nonEmptyListsAreNotEmpty ()\r\n}}}\r\n\r\nIn this code, we define a class IsList which serves as a proof that something is a type-level list, via the function isList. When using this, we may occasionally get into a situation where the types guarantee that we're working with a non-empty list, but we're asked to handle the empty-list case anyway. Suppose we want to define a nice little \"absurd\" function that serves as a reminder to readers that this code branch is impossible, in a way that GHC can verify. This function is named \"nonEmptyListsAreNonEmpty\" above.\r\n\r\nUnfortunately, this code fails with\r\n\r\n{{{\r\nMain.hs:25:34: error:\r\n • Couldn't match type ‘'[]’ with ‘Head '[] : Tail '[]’\r\n arising from a use of ‘nonEmptyListsAreNotEmpty’\r\n • In the second argument of ‘isList’, namely\r\n ‘nonEmptyListsAreNotEmpty’\r\n In the expression: isList @(x : xs) nonEmptyListsAreNotEmpty ()\r\n In an equation for ‘sillyExample’:\r\n sillyExample = isList @(x : xs) nonEmptyListsAreNotEmpty ()\r\n |\r\n25 | sillyExample = isList @(x ': xs) nonEmptyListsAreNotEmpty ()\r\n | ^^^^^^^^^^^^^^^^^^^^^^^^\r\n}}}\r\n\r\nAnd indeed, the fact that [] can't be matched against (_ : _) is in some sense the point. More generally, whenever I'm fooling around with this sort of Haskell code (in which classes are being used to provide runtime witnesses of type-level structure), I relatively regularly find myself in a branch of code where the context is obviously inconsistent, wishing that I had some way to say \"search your heart, GHC; you know this case to be impossible\". The fact that I can't even factor out this dead code into a function like nonEmptyListsAreNonEmpty just seems like insult added to injury.\r\n\r\nThis is a minor concern, to be sure. Nevertheless, it seems to me that we should be able to write this function somehow, especially given that there are various ways to trick GHC into accepting something analogous (by clever use of GADTs such as :~:, perhaps).","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16265API Annotations: parens anns discarded for `(*)` operator2019-07-07T18:00:45ZAlan ZimmermanAPI Annotations: parens anns discarded for `(*)` operatorThe patch from https://phabricator.haskell.org/D4865 introduces
```hs
go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix
= do { warnStarBndr l
; let name = mkOccName tcClsName (if isUni then "★" else "*")
...The patch from https://phabricator.haskell.org/D4865 introduces
```hs
go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix
= do { warnStarBndr l
; let name = mkOccName tcClsName (if isUni then "★" else "*")
; return (cL l (Unqual name), acc, fix, ann) }
```
which discards the parens annotations belonging to the `HsParTy`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"API Annotations: parens anns discarded for `(*)` operator","status":"New","operating_system":"","component":"Compiler (Parser)","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The patch from https://phabricator.haskell.org/D4865 introduces\r\n\r\n{{{#!hs\r\n go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix\r\n = do { warnStarBndr l\r\n ; let name = mkOccName tcClsName (if isUni then \"★\" else \"*\")\r\n ; return (cL l (Unqual name), acc, fix, ann) }\r\n}}}\r\n\r\nwhich discards the parens annotations belonging to the `HsParTy`.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1Alan ZimmermanAlan Zimmermanhttps://gitlab.haskell.org/ghc/ghc/-/issues/16264Install reqlib'd libraries during CI2021-12-23T08:55:15ZBen GamariInstall reqlib'd libraries during CICurrently tests requiring external libraries are hardly ever run. We likely don't want to run them in every job but we should have at least one job that makes a point of doing so.
<details><summary>Trac metadata</summary>
| Trac field ...Currently tests requiring external libraries are hardly ever run. We likely don't want to run them in every job but we should have at least one job that makes a point of doing so.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Continuous Integration |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Install reqlib'd libraries during CI","status":"New","operating_system":"","component":"Continuous Integration","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"bgamari"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Currently tests requiring external libraries are hardly ever run. We likely don't want to run them in every job but we should have at least one job that makes a point of doing so.","type_of_failure":"OtherFailure","blocking":[]} -->Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/16263Rework GHC's treatment of constraints in kinds2019-07-07T18:00:45ZRichard Eisenbergrae@richarde.devRework GHC's treatment of constraints in kindsGHC 8.6 accepts
```hs
data Q :: Eq a => Type
```
It shouldn't, as we can't have `Eq a` as a constraint in kinds. Note that writing a constructor for `Q` is rejected.
<details><summary>Trac metadata</summary>
| Trac field ...GHC 8.6 accepts
```hs
data Q :: Eq a => Type
```
It shouldn't, as we can't have `Eq a` as a constraint in kinds. Note that writing a constructor for `Q` is rejected.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"GHC accepts illegal constraint in kind","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["TypeInType"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"GHC 8.6 accepts\r\n\r\n{{{#!hs\r\ndata Q :: Eq a => Type\r\n}}}\r\n\r\nIt shouldn't, as we can't have `Eq a` as a constraint in kinds. Note that writing a constructor for `Q` is rejected.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Simon Peyton JonesSimon Peyton Joneshttps://gitlab.haskell.org/ghc/ghc/-/issues/16262Hadrian: respect dynamicGhcPrograms2019-07-07T18:00:46ZdavideHadrian: respect dynamicGhcProgramsWhile `dynamicGhcPrograms` exists in Hadrian, it is not used to the extent that it's make counter part is used (`DYNAMIC_GHC_PROGRAMS`). All relevant logic from make should be implemented in Hadrian as well. A simple search for `DYNAMIC_...While `dynamicGhcPrograms` exists in Hadrian, it is not used to the extent that it's make counter part is used (`DYNAMIC_GHC_PROGRAMS`). All relevant logic from make should be implemented in Hadrian as well. A simple search for `DYNAMIC_GHC_PROGRAMS` is a good place to start.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hadrian: respect dynamicGhcPrograms","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["dynamic","ghc","hadrian","programs"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"While `dynamicGhcPrograms` exists in Hadrian, it is not used to the extent that it's make counter part is used (`DYNAMIC_GHC_PROGRAMS`). All relevant logic from make should be implemented in Hadrian as well. A simple search for `DYNAMIC_GHC_PROGRAMS` is a good place to start.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16261[] interpreted as an overloaded list in rule LHS2019-07-07T18:00:46ZDavid Feuer[] interpreted as an overloaded list in rule LHSCompiling `Data.Set.Internal` produces the following:
```
Data/Set/Internal.hs:958:11: warning: [-Winline-rule-shadowing]
Rule "Set.toAscListBack" may never fire
because rule "Class op fromListN" for ‘GHCExts.fromListN’ might ...Compiling `Data.Set.Internal` produces the following:
```
Data/Set/Internal.hs:958:11: warning: [-Winline-rule-shadowing]
Rule "Set.toAscListBack" may never fire
because rule "Class op fromListN" for ‘GHCExts.fromListN’ might fire first
Probable fix: add phase [n] or [~n] to the competing rule
|
958 | {-# RULES "Set.toAscListBack" [1] foldrFB (:) [] = toAscList #-}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Data/Set/Internal.hs:960:11: warning: [-Winline-rule-shadowing]
Rule "Set.toDescListBack" may never fire
because rule "Class op fromListN" for ‘GHCExts.fromListN’ might fire first
Probable fix: add phase [n] or [~n] to the competing rule
|
960 | {-# RULES "Set.toDescListBack" [1] foldlFB (\xs x -> x : xs) [] = toDescList #-}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
As mpickering figured out, the trouble is that `[]` in the rule LHS is being interpreted as an overloaded list. The module does *not* enable `OverloadedLists`. Furthermore, even if it *did*, I would argue that it is *never* correct to put one in a rule LHS, so we should always interpret `[]` as the empty list constructor in `RULES` left-hand sides.8.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/16260Use of plugins causes different SafeHaskellMode returned for the module2019-07-07T18:00:46ZZejun WuUse of plugins causes different SafeHaskellMode returned for the moduleUse of plugins will mark safe inference as failed, even when the plugin does not modify anything. This can result in compile error when -XSafe is used. For example:
```
$ cat DefaultPlugin.hs
module DefaultPlugin (plugin) where
import G...Use of plugins will mark safe inference as failed, even when the plugin does not modify anything. This can result in compile error when -XSafe is used. For example:
```
$ cat DefaultPlugin.hs
module DefaultPlugin (plugin) where
import GhcPlugins
plugin = defaultPlugin
$ cat B.hs
{-# OPTIONS_GHC -fplugin DefaultPlugin #-}
module B (answer) where
answer = 42
$ cat A.hs
{-# LANGUAGE Safe #-}
module A (main) where
import B
main = print answer
$ ...
A.hs:4:1: error:
B: Can't be safely imported! The module itself isn't safe.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.7 |
| 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":"Use of plugins causes -XSafe to fail","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Use of plugins will mark safe inference as failed, even when the plugin does not modify anything. This can result in compile error when -XSafe is used. For example:\r\n\r\n{{{\r\n$ cat DefaultPlugin.hs\r\nmodule DefaultPlugin (plugin) where\r\nimport GhcPlugins\r\nplugin = defaultPlugin\r\n\r\n$ cat B.hs\r\n{-# OPTIONS_GHC -fplugin DefaultPlugin #-}\r\nmodule B (answer) where\r\nanswer = 42\r\n\r\n$ cat A.hs\r\n{-# LANGUAGE Safe #-}\r\nmodule A (main) where\r\nimport B\r\nmain = print answer\r\n\r\n$ ...\r\nA.hs:4:1: error:\r\n B: Can't be safely imported! The module itself isn't safe.\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1Zejun WuZejun Wuhttps://gitlab.haskell.org/ghc/ghc/-/issues/16259Hadrian does not work with a cabal v2-installed "Happy"2019-11-30T14:50:58ZRoland SennHadrian does not work with a cabal v2-installed "Happy"I installed Happy with:
```
cabal new-install --symlink-bindir=~/Software/ghc-8.6.3/bin happy
```
where `~/Software/ghc-8.6.3/bin` is in my PATH.
When I run `hadrian/build.sh -c --flavour=devel2` I get the following error:
```
happy...I installed Happy with:
```
cabal new-install --symlink-bindir=~/Software/ghc-8.6.3/bin happy
```
where `~/Software/ghc-8.6.3/bin` is in my PATH.
When I run `hadrian/build.sh -c --flavour=devel2` I get the following error:
```
happy: /home/roland/.cabal/share/x86_64-linux-ghc-8.6.3/happy-1.19.9/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
```
It's correct, I don't have a file `.cabal/share/x86_64-linux-ghc-8.6.3/happy-1.19.9/HappyTemplate-arrays-coerce`.
However I have a file `.cabal/store/ghc-8.6.3/happy-1.19.9-84db80555b9a8f54be2ca475bccbc751401ffbff30194c8c26d08a002a665431/share/HappyTemplate-arrays-coerce`.
If I do an old-fashioned `cabal v1-install happy`, it creates the missing file `.cabal/share/x86_64-linux-ghc-8.6.3/happy-1.19.9/HappyTemplate-arrays-coerce` and Hadrian is now able to build!
Hadrian should not depend on old-style cabal installs!
Program versions:
```
roland@goms:~/Projekte/ghc$ cat /etc/issue
Debian GNU/Linux 9 \n \l
roland@goms:~/Projekte/ghc$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.3
roland@goms:~/Projekte/ghc$ hadrian/build.sh --version
Up to date
Shake build system, version 0.17.4
roland@goms:~/Projekte/ghc$ happy --version
Happy Version 1.19.9 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow
Happy is a Yacc for Haskell, and comes with ABSOLUTELY NO WARRANTY.
This program is free software; you can redistribute it and/or modify
it under the terms given in the file 'LICENSE' distributed with
the Happy sources.
roland@goms:~/Projekte/ghc$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library
```Andrey MokhovAndrey Mokhovhttps://gitlab.haskell.org/ghc/ghc/-/issues/16258PowerPC Big-Endian: ArithInt16, ArithInt8, ArithWord16, and ArithWord8 fail2023-10-25T09:09:04ZPeter Trommlerptrommler@acm.orgPowerPC Big-Endian: ArithInt16, ArithInt8, ArithWord16, and ArithWord8 failThe tests were run on a PowerMac G5 running Linux, PowerMacs are big-endian.
I reduced the issue to this program where I get the incorrect answer `25132`:
```hs
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE Unbo...The tests were run on a PowerMac G5 running Linux, PowerMacs are big-endian.
I reduced the issue to this program where I get the incorrect answer `25132`:
```hs
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
module Main where
import GHC.Exts
main :: IO ()
main = do
putStrLn $ show (apply2 plusInt16# (50) (50))
apply2 :: (Int16# -> Int16# -> Int16#) -> Int -> Int -> Int
apply2 op (I# a) (I# b) =
let (# sa, sb #) = (# narrowInt16# a, narrowInt16# b #)
r = op sa sb
in I# (extendInt16# r)
{-# NOINLINE apply2 #-}
```
Curiously, when I inline `plusInt16#` and remove the op parameter the result is correct.
The test passes on little-endian PowerPC 64-bit.
Note: This bug is different from #16222, which deals with the C calling convention.8.10.1Peter Trommlerptrommler@acm.orgPeter Trommlerptrommler@acm.orghttps://gitlab.haskell.org/ghc/ghc/-/issues/16257-fexternal-interpreter with external C shared library leads to undefined symb...2019-07-07T18:00:47ZGuillaume Bouchard-fexternal-interpreter with external C shared library leads to undefined symbol during template haskell phaseI'm building the following `Foo.hs` program using the `hmatrix-gsl` library:
```haskell
{-# LANGUAGE TemplateHaskell #-}
import Numeric.GSL.Integration
main = do
print $([| 10 |])
print $ integrateQNG 1 (\x -> x) 0 1
```
I observ...I'm building the following `Foo.hs` program using the `hmatrix-gsl` library:
```haskell
{-# LANGUAGE TemplateHaskell #-}
import Numeric.GSL.Integration
main = do
print $([| 10 |])
print $ integrateQNG 1 (\x -> x) 0 1
```
I observes undefined symbols during the template haskell phase when using `-fexternal-interpreter`:
Without `-fexternal-interpreter`:
```
$ ghc -package hmatrix-gsl Foo.hs
[1 of 1] Compiling Main ( Foo.hs, Foo.o )
Linking Foo ...
[nix-shell:~/bug_report_external]$ ./Foo
10
(0.5,5.551115123125783e-15)
```
But with `-fexternal-interpreter`:
```
$ ghc -fexternal-interpreter -package hmatrix-gsl Foo.hs
[1 of 1] Compiling Main ( Foo.hs, Foo.o )
<command line>: can't load .so/.DLL for: /nix/store/6dhcmmfgy5fa0p3d235yaz4qfx8jhpar-gsl-2.5/lib/libgsl.so (/nix/store/6dhcmmfgy5fa0p3d235yaz4qfx8jhpar-gsl-2.5/lib/libgsl.so: undefined symbol: cblas_ctrmv)
```
I suspect that it happen during the template haskell phase because I cannot observe this issue without template haskell.
I can observe this issue with a few other libraries, I used `hmatrix-gsl` in this example because it is on hackage. Actually, you can even reduce the file to:
```haskell
{-# LANGUAGE TemplateHaskell #-}
main = do
print $([| 10 |])
```
and get the same error as long as you have `-package hmatrix-gsl` in your command line.
I generate the build environment with this nix file:
```nix
with import (fetchTarball {
# 25/01/2019
url = https://github.com/nixos/nixpkgs/archive/11cf7d6e1ff.tar.gz;
sha256 = "0zcg4mgfdk3ryiqj1j5iv5bljjvsgi6q6j9z1vkq383c4g4clc72";
}) {};
mkShell {
buildInputs = [(haskellPackages.ghcWithPackages(p: [p.hmatrix-gsl]))];
}
```
It setups `ghc-8.6.3` with `hmatrix-gsl-0.19.0.1` (the latest on hackage).
Note that `hmatrix-gsl` depends on library `gsl` which have a weird symbol setup. The main library file `libgsl` does not contain the `cbal_ctrmv` symbol which is contained in another library `libgslcbal` which is not a dependency of the shared object `libgsl.so`.
library `gslcblas` is listed in `extra-libraries` of the `hmatrix-gsl` package:
```
ghc-pkg field hmatrix-gsl extra-libraries
extra-libraries:
gsl gslcblas m
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"-fexternal-interpreter with external C shared library leads to undefined symbol during template haskell phase","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I'm building the following `Foo.hs` program using the `hmatrix-gsl` library:\r\n\r\n{{{#!haskell\r\n{-# LANGUAGE TemplateHaskell #-}\r\n\r\nimport Numeric.GSL.Integration\r\n\r\nmain = do\r\n print $([| 10 |])\r\n print $ integrateQNG 1 (\\x -> x) 0 1\r\n}}}\r\n\r\nI observes undefined symbols during the template haskell phase when using `-fexternal-interpreter`:\r\n\r\nWithout `-fexternal-interpreter`:\r\n\r\n{{{\r\n$ ghc -package hmatrix-gsl Foo.hs\r\n[1 of 1] Compiling Main ( Foo.hs, Foo.o )\r\nLinking Foo ...\r\n\r\n[nix-shell:~/bug_report_external]$ ./Foo \r\n10\r\n(0.5,5.551115123125783e-15)\r\n}}}\r\n\r\nBut with `-fexternal-interpreter`:\r\n\r\n{{{\r\n$ ghc -fexternal-interpreter -package hmatrix-gsl Foo.hs\r\n[1 of 1] Compiling Main ( Foo.hs, Foo.o )\r\n<command line>: can't load .so/.DLL for: /nix/store/6dhcmmfgy5fa0p3d235yaz4qfx8jhpar-gsl-2.5/lib/libgsl.so (/nix/store/6dhcmmfgy5fa0p3d235yaz4qfx8jhpar-gsl-2.5/lib/libgsl.so: undefined symbol: cblas_ctrmv)\r\n}}}\r\n\r\nI suspect that it happen during the template haskell phase because I cannot observe this issue without template haskell.\r\n\r\nI can observe this issue with a few other libraries, I used `hmatrix-gsl` in this example because it is on hackage. Actually, you can even reduce the file to:\r\n\r\n{{{#!haskell\r\n{-# LANGUAGE TemplateHaskell #-}\r\n\r\nmain = do\r\n print $([| 10 |])\r\n}}}\r\n\r\nand get the same error as long as you have `-package hmatrix-gsl` in your command line.\r\n\r\nI generate the build environment with this nix file:\r\n\r\n{{{#!nix\r\nwith import (fetchTarball {\r\n # 25/01/2019\r\n url = https://github.com/nixos/nixpkgs/archive/11cf7d6e1ff.tar.gz;\r\n sha256 = \"0zcg4mgfdk3ryiqj1j5iv5bljjvsgi6q6j9z1vkq383c4g4clc72\";\r\n }) {};\r\nmkShell {\r\n buildInputs = [(haskellPackages.ghcWithPackages(p: [p.hmatrix-gsl]))];\r\n}\r\n}}}\r\n\r\nIt setups `ghc-8.6.3` with `hmatrix-gsl-0.19.0.1` (the latest on hackage).\r\n\r\nNote that `hmatrix-gsl` depends on library `gsl` which have a weird symbol setup. The main library file `libgsl` does not contain the `cbal_ctrmv` symbol which is contained in another library `libgslcbal` which is not a dependency of the shared object `libgsl.so`.\r\n\r\nlibrary `gslcblas` is listed in `extra-libraries` of the `hmatrix-gsl` package:\r\n\r\n{{{\r\nghc-pkg field hmatrix-gsl extra-libraries\r\nextra-libraries:\r\n gsl gslcblas m\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->