GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:25:22Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/12730Pattern synonym signature fails with unlifted type2019-07-07T18:25:22ZIcelandjackPattern synonym signature fails with unlifted type```hs
pattern P2# a b = (# a, b #)
```
works but adding a type signture makes it fail
```hs
-- tp0w.hs:130:25-34: error: …
-- • Expecting a lifted type, but ‘(# a, b #)’ is unlifted
-- • In the type ‘(# a, b #)’
-- Compilation ...```hs
pattern P2# a b = (# a, b #)
```
works but adding a type signture makes it fail
```hs
-- tp0w.hs:130:25-34: error: …
-- • Expecting a lifted type, but ‘(# a, b #)’ is unlifted
-- • In the type ‘(# a, b #)’
-- Compilation failed.
pattern P2# :: a -> b -> (# a, b #)
pattern P2# a b = (# a, b #)
```
Same with these
```hs
pattern True :: Int#
pattern True = 1#
pattern False :: Int#
pattern False = 0#
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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":"Pattern synonym signature fails with unlifted type","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{#!hs\r\npattern P2# a b = (# a, b #)\r\n}}}\r\n\r\nworks but adding a type signture makes it fail\r\n\r\n{{{#!hs\r\n-- tp0w.hs:130:25-34: error: …\r\n-- • Expecting a lifted type, but ‘(# a, b #)’ is unlifted\r\n-- • In the type ‘(# a, b #)’\r\n-- Compilation failed.\r\npattern P2# :: a -> b -> (# a, b #)\r\npattern P2# a b = (# a, b #)\r\n}}}\r\n\r\nSame with these\r\n\r\n{{{#!hs\r\npattern True :: Int#\r\npattern True = 1#\r\n\r\npattern False :: Int#\r\npattern False = 0#\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.0.2https://gitlab.haskell.org/ghc/ghc/-/issues/12729Unlifted newtypes via GADTSyntax2019-07-07T18:25:23ZKrzysztof GogolewskiUnlifted newtypes via GADTSyntaxGHC disallows to define a newtype of an unlifted type (`newtype A = A Int#`). However, this restriction is not enforced when the newtype is defined using GADT syntax:
```
newtype A where
A :: Int# -> A
```
For example, I can derive S...GHC disallows to define a newtype of an unlifted type (`newtype A = A Int#`). However, this restriction is not enforced when the newtype is defined using GADT syntax:
```
newtype A where
A :: Int# -> A
```
For example, I can derive Show for A and on my machine `main = print (A 0#)` segfaults.
Tested on GHC 8.0.1 and master.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Unlifted newtypes via GADTSyntax","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"GHC disallows to define a newtype of an unlifted type (`newtype A = A Int#`). However, this restriction is not enforced when the newtype is defined using GADT syntax:\r\n\r\n{{{\r\nnewtype A where\r\n A :: Int# -> A\r\n}}}\r\n\r\nFor example, I can derive Show for A and on my machine `main = print (A 0#)` segfaults.\r\n\r\nTested on GHC 8.0.1 and master.","type_of_failure":"OtherFailure","blocking":[]} -->8.0.2https://gitlab.haskell.org/ghc/ghc/-/issues/12728setnumcapabilities001 sometimes fails on Windows2019-07-07T18:25:23ZBen Gamarisetnumcapabilities001 sometimes fails on WindowsI have seen the `setnumcapabilities001` test fail at least once on Windows (\[[https://phabricator.haskell.org/harbormaster/build/14178/?l=0](https://phabricator.haskell.org/harbormaster/build/14178/?l=0)\]). It seems that the assertion ...I have seen the `setnumcapabilities001` test fail at least once on Windows (\[[https://phabricator.haskell.org/harbormaster/build/14178/?l=0](https://phabricator.haskell.org/harbormaster/build/14178/?l=0)\]). It seems that the assertion `ASSERT(n_idle == 0);` in `Schedule.scheduleDoGC` is to blame in this particular case,
```
setnumcapabilities001.exe: internal error: ASSERTION FAILED: file rts\Schedule.c, line 1636
```8.0.2Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/12727ghc: panic! (the 'impossible' happened) - piResultTy2019-07-07T18:25:23ZOllie Charlesghc: panic! (the 'impossible' happened) - piResultTyOddly this only happens on our build server, not on my local machine. On compilation, I get:
```
[187 of 273] Compiling Query.Order ( Query/Order.hs, dist/build/Query/Order.o )
Query/Order.hs:340:1: warning: [-Wredundant-constrain...Oddly this only happens on our build server, not on my local machine. On compilation, I get:
```
[187 of 273] Compiling Query.Order ( Query/Order.hs, dist/build/Query/Order.o )
Query/Order.hs:340:1: warning: [-Wredundant-constraints]
• Redundant constraint: MonadBaseControl IO m
• In the type signature for:
updateOrdersSuccess :: (MonadBaseControl IO m,
MonadTransaction m) =>
m ()
ghc: panic! (the 'impossible' happened)
(GHC version 8.0.1 for x86_64-unknown-linux):
piResultTy
Maybe Int64
a1_a4WiL
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
The configuration parameters are:
```
configureFlags: --verbose --prefix=/nix/store/qxfjd5jxr593dn43i3659s86d0rdllyv-circuithub-api-0.0.4 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-circuithub-api-0.0.4.drv-0/package.conf.d --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --disable-shared --enable-library-vanilla --disable-executable-dynamic --disable-tests
```
I've attached Query/Order.hs, but you won't be able to compile it stand-alone.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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: panic! (the 'impossible' happened) - piResultTy","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Oddly this only happens on our build server, not on my local machine. On compilation, I get:\r\n\r\n{{{\r\n[187 of 273] Compiling Query.Order ( Query/Order.hs, dist/build/Query/Order.o )\r\n\r\nQuery/Order.hs:340:1: warning: [-Wredundant-constraints]\r\n • Redundant constraint: MonadBaseControl IO m\r\n • In the type signature for:\r\n updateOrdersSuccess :: (MonadBaseControl IO m,\r\n MonadTransaction m) =>\r\n m ()\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.0.1 for x86_64-unknown-linux):\r\n\tpiResultTy\r\n Maybe Int64\r\n a1_a4WiL\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n\r\nThe configuration parameters are:\r\n\r\n{{{\r\nconfigureFlags: --verbose --prefix=/nix/store/qxfjd5jxr593dn43i3659s86d0rdllyv-circuithub-api-0.0.4 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-circuithub-api-0.0.4.drv-0/package.conf.d --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --disable-shared --enable-library-vanilla --disable-executable-dynamic --disable-tests\r\n}}}\r\n\r\nI've attached Query/Order.hs, but you won't be able to compile it stand-alone.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/12726GHC 8.0.1: ghc --make broken on Raspberry Pi2019-07-07T18:25:23ZrobjhenGHC 8.0.1: ghc --make broken on Raspberry Pi## System and compiler version
System: Raspberry Pi 2 running Raspbian Jessie (September 2016 release); LLVM 3.7 installed.
GHC: GHC 8.0.1 ARMv7 binary downloaded from GHC webpage (ghc-8.0.1-armv7-deb8-linux.tar.xz).
GCC version 4.9.2...## System and compiler version
System: Raspberry Pi 2 running Raspbian Jessie (September 2016 release); LLVM 3.7 installed.
GHC: GHC 8.0.1 ARMv7 binary downloaded from GHC webpage (ghc-8.0.1-armv7-deb8-linux.tar.xz).
GCC version 4.9.2 (Raspbian 4.9.2-10)
## Details
GHCi works perfectly, however 'ghc --make' does not work at all. The following minimal test program fails to compile:
```hs
main :: IO ()
main = putStrLn "Hello!"
```
Here are the first few lines of the compiler output:
```
pi@raspberrypi:~/haskell/test $ ~/opt/ghc-8.0.1/bin/ghc --make test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
/tmp/ghc2094_0/ghc_6.s: Assembler messages:
/tmp/ghc2094_0/ghc_6.s:40:0: error:
Error: selected processor does not support ARM mode `movw r7,:lower16:stg_bh_upd_frame_info'
```
See attachment for full compiler output with '-v'.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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.0.1: ghc --make broken on Raspberry Pi","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":["pi","raspberry"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"== System and compiler version ==\r\n\r\nSystem: Raspberry Pi 2 running Raspbian Jessie (September 2016 release); LLVM 3.7 installed.\r\n\r\nGHC: GHC 8.0.1 ARMv7 binary downloaded from GHC webpage (ghc-8.0.1-armv7-deb8-linux.tar.xz).\r\n\r\nGCC version 4.9.2 (Raspbian 4.9.2-10)\r\n\r\n== Details ==\r\n\r\nGHCi works perfectly, however 'ghc --make' does not work at all. The following minimal test program fails to compile:\r\n\r\n{{{#!hs\r\nmain :: IO ()\r\nmain = putStrLn \"Hello!\"\r\n}}}\r\n\r\nHere are the first few lines of the compiler output:\r\n\r\n{{{\r\npi@raspberrypi:~/haskell/test $ ~/opt/ghc-8.0.1/bin/ghc --make test.hs\r\n[1 of 1] Compiling Main ( test.hs, test.o )\r\n/tmp/ghc2094_0/ghc_6.s: Assembler messages:\r\n\r\n/tmp/ghc2094_0/ghc_6.s:40:0: error:\r\n Error: selected processor does not support ARM mode `movw r7,:lower16:stg_bh_upd_frame_info'\r\n}}}\r\n\r\nSee attachment for full compiler output with '-v'.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/12725T7037 is broken on Windows2019-07-07T18:25:23ZBen GamariT7037 is broken on Windows`T7037` appears to fail on Windows. Namely, `stdout` appears to be empty, whereas the expected output is `"ok"`. I had suspected that the issue was the `execv` call failing but this doesn't seem to be the case; no code after `execv` is e...`T7037` appears to fail on Windows. Namely, `stdout` appears to be empty, whereas the expected output is `"ok"`. I had suspected that the issue was the `execv` call failing but this doesn't seem to be the case; no code after `execv` is executed. A problem for another day...8.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/12723Family instance modules are not fingerprinted in ABI2022-06-18T20:19:08ZEdward Z. YangFamily instance modules are not fingerprinted in ABIThis leads to the following delightful, five module bug:
```
-- A.hs
{-# LANGUAGE TypeFamilies #-}
module A where
type family F a
type instance F Int = Bool
-- B.hs
module B (module A) where
import A
-- C.hs
module C where
import B
-...This leads to the following delightful, five module bug:
```
-- A.hs
{-# LANGUAGE TypeFamilies #-}
module A where
type family F a
type instance F Int = Bool
-- B.hs
module B (module A) where
import A
-- C.hs
module C where
import B
-- D.hs
module D where
import C
-- E.hs
module E where
import D
import B
```
Build these modules. Then rename A to A2 (fixing B's import), and build them again. You'll get:
```
ezyang@sabre:~/Dev/labs/T3871$ ghc --make E.hs
[1 of 5] Compiling A2 ( A2.hs, A2.o )
[2 of 5] Compiling B ( B.hs, B.o )
[3 of 5] Compiling C ( C.hs, C.o ) [B changed]
[5 of 5] Compiling E ( E.hs, E.o ) [B changed]
attempting to use module ‘A’ (./A.hs) which is not loaded
```
The problem is clear: D was not recompiled, but it needs to be, because when the module gets renamed, we need to update its list of family instance modules to rename A to A2. When we don't do this, the subsequent family instance check chokes because it tries to load A. And why did D decide not to get recompiled? Because the ABI hash of C did not change. And that's WRONG.
(Also, family instances are really awful, you really do have to rebuild everything when you change them. UGH.)
This occasionally affected the Cabal project, see https://github.com/haskell/cabal/issues/3871https://gitlab.haskell.org/ghc/ghc/-/issues/12722Compile bug when upgrading stack-1.2.0 on Mac OS X2019-07-07T18:25:24ZpisomojadoCompile bug when upgrading stack-1.2.0 on Mac OS Xoutput from stack upgrade:
```
michael@gelato:~/Code/autorefactorer-site$ stack upgrade
Fetching package index ...remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1...output from stack upgrade:
```
michael@gelato:~/Code/autorefactorer-site$ stack upgrade
Fetching package index ...remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
Fetched package index.
Populated index cache.
store-core-0.2.0.2: configure
store-core-0.2.0.2: build
http-client-0.5.3.1: configure
http-client-0.5.3.1: build
optparse-applicative-0.13.0.0: configure
optparse-applicative-0.13.0.0: build
path-0.5.8: configure
path-0.5.8: build
store-core-0.2.0.2: copy/register
th-lift-instances-0.1.7: configure
path-0.5.8: copy/register
th-lift-instances-0.1.7: build
path-io-1.1.0: configure
path-io-1.1.0: build
th-lift-instances-0.1.7: copy/register
th-orphans-0.13.1: configure
path-io-1.1.0: copy/register
th-orphans-0.13.1: build
unicode-transforms-0.1.0.1: configure
unicode-transforms-0.1.0.1: build
unicode-transforms-0.1.0.1: copy/register
optparse-applicative-0.13.0.0: copy/register
th-orphans-0.13.1: copy/register
optparse-simple-0.0.3: configure
optparse-simple-0.0.3: build
th-utilities-0.2.0.1: configure
th-utilities-0.2.0.1: build
optparse-simple-0.0.3: copy/register
http-client-0.5.3.1: copy/register
http-client-tls-0.3.0: configure
http-client-tls-0.3.0: build
http-client-tls-0.3.0: copy/register
http-conduit-2.2.0: configure
http-conduit-2.2.0: build
th-utilities-0.2.0.1: copy/register
store-0.2.1.2: configure
store-0.2.1.2: build
http-conduit-2.2.0: copy/register
store-0.2.1.2: copy/register
stack-1.2.0: configure
[1 of 1] Compiling Main ( /private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/Setup.hs, /private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/Main.o )
Linking /private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup ...
Configuring stack-1.2.0...
stack-1.2.0: build
Preprocessing library stack-1.2.0...
[ 1 of 96] Compiling Text.PrettyPrint.Leijen.Extended ( src/Text/PrettyPrint/Leijen/Extended.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Text/PrettyPrint/Leijen/Extended.o )
[ 2 of 96] Compiling Stack.Ghci.Script ( src/Stack/Ghci/Script.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Stack/Ghci/Script.o )
[ 3 of 96] Compiling Stack.FileWatch ( src/Stack/FileWatch.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Stack/FileWatch.o )
[ 4 of 96] Compiling System.Process.PagerEditor ( src/System/Process/PagerEditor.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/PagerEditor.o )
[ 5 of 96] Compiling System.Process.Log ( src/System/Process/Log.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/Log.o )
[ 6 of 96] Compiling Paths_stack ( .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_stack.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Paths_stack.o )
[ 7 of 96] Compiling Path.Find ( src/Path/Find.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Path/Find.o )
[ 8 of 96] Compiling Path.Extra ( src/Path/Extra.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Path/Extra.o )
[ 9 of 96] Compiling System.Process.Read ( src/System/Process/Read.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/Read.o )
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.3 for x86_64-apple-darwin):
Loading temp shared object failed: dlopen(/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/ghc20328_0/libghc_55.dylib, 5): no suitable image found. Did find:
/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/ghc20328_0/libghc_55.dylib: malformed mach-o: load commands size (47024) > 32768
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Completed 14 action(s).
-- While building package stack-1.2.0 using:
/private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build lib:stack exe:stack --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.10.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Compile bug when upgrading stack-1.2.0 on Mac OS X","status":"New","operating_system":"","component":"Build System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.10.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"output from stack upgrade:\r\n\r\n\r\n{{{\r\nmichael@gelato:~/Code/autorefactorer-site$ stack upgrade\r\nFetching package index ...remote: Counting objects: 1, done.\r\nremote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0\r\nUnpacking objects: 100% (1/1), done.\r\nFetched package index. \r\nPopulated index cache. \r\nstore-core-0.2.0.2: configure\r\nstore-core-0.2.0.2: build\r\nhttp-client-0.5.3.1: configure\r\nhttp-client-0.5.3.1: build\r\noptparse-applicative-0.13.0.0: configure\r\noptparse-applicative-0.13.0.0: build\r\npath-0.5.8: configure\r\npath-0.5.8: build\r\nstore-core-0.2.0.2: copy/register\r\nth-lift-instances-0.1.7: configure\r\npath-0.5.8: copy/register\r\nth-lift-instances-0.1.7: build\r\npath-io-1.1.0: configure\r\npath-io-1.1.0: build\r\nth-lift-instances-0.1.7: copy/register\r\nth-orphans-0.13.1: configure\r\npath-io-1.1.0: copy/register\r\nth-orphans-0.13.1: build\r\nunicode-transforms-0.1.0.1: configure\r\nunicode-transforms-0.1.0.1: build\r\nunicode-transforms-0.1.0.1: copy/register\r\noptparse-applicative-0.13.0.0: copy/register\r\nth-orphans-0.13.1: copy/register\r\noptparse-simple-0.0.3: configure\r\noptparse-simple-0.0.3: build\r\nth-utilities-0.2.0.1: configure\r\nth-utilities-0.2.0.1: build\r\noptparse-simple-0.0.3: copy/register\r\nhttp-client-0.5.3.1: copy/register\r\nhttp-client-tls-0.3.0: configure\r\nhttp-client-tls-0.3.0: build\r\nhttp-client-tls-0.3.0: copy/register\r\nhttp-conduit-2.2.0: configure\r\nhttp-conduit-2.2.0: build\r\nth-utilities-0.2.0.1: copy/register\r\nstore-0.2.1.2: configure\r\nstore-0.2.1.2: build\r\nhttp-conduit-2.2.0: copy/register\r\nstore-0.2.1.2: copy/register\r\nstack-1.2.0: configure\r\n[1 of 1] Compiling Main ( /private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/Setup.hs, /private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/Main.o )\r\nLinking /private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup ...\r\nConfiguring stack-1.2.0...\r\nstack-1.2.0: build\r\nPreprocessing library stack-1.2.0...\r\n[ 1 of 96] Compiling Text.PrettyPrint.Leijen.Extended ( src/Text/PrettyPrint/Leijen/Extended.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Text/PrettyPrint/Leijen/Extended.o )\r\n[ 2 of 96] Compiling Stack.Ghci.Script ( src/Stack/Ghci/Script.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Stack/Ghci/Script.o )\r\n[ 3 of 96] Compiling Stack.FileWatch ( src/Stack/FileWatch.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Stack/FileWatch.o )\r\n[ 4 of 96] Compiling System.Process.PagerEditor ( src/System/Process/PagerEditor.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/PagerEditor.o )\r\n[ 5 of 96] Compiling System.Process.Log ( src/System/Process/Log.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/Log.o )\r\n[ 6 of 96] Compiling Paths_stack ( .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_stack.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Paths_stack.o )\r\n[ 7 of 96] Compiling Path.Find ( src/Path/Find.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Path/Find.o )\r\n[ 8 of 96] Compiling Path.Extra ( src/Path/Extra.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Path/Extra.o )\r\n[ 9 of 96] Compiling System.Process.Read ( src/System/Process/Read.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/Read.o )\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 7.10.3 for x86_64-apple-darwin):\r\n Loading temp shared object failed: dlopen(/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/ghc20328_0/libghc_55.dylib, 5): no suitable image found. Did find:\r\n /var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/ghc20328_0/libghc_55.dylib: malformed mach-o: load commands size (47024) > 32768\r\n \r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n \r\nCompleted 14 action(s).\r\n\r\n-- While building package stack-1.2.0 using:\r\n /private/var/folders/vy/td7mc44s36g6b_wvdz7258rw0000gn/T/stack-upgrade19320/stack-1.2.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build lib:stack exe:stack --ghc-options \" -ddump-hi -ddump-to-file\"\r\n Process exited with code: ExitFailure 1\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/12721Implement sigINT handler for Window's timeout.exe2019-07-07T18:25:24ZTamar ChristinaImplement sigINT handler for Window's timeout.exeOn linux we current register a sigINT handler and kill the child processed.
On Windows we don't. This sometimes leaves dangling processes when the testsuite is interrupted. Causing future failures until the dangling processes are killed...On linux we current register a sigINT handler and kill the child processed.
On Windows we don't. This sometimes leaves dangling processes when the testsuite is interrupted. Causing future failures until the dangling processes are killed.
We already specifically create a job group and assign the processors to those jobs. All we have to do is register the handler and kill the process if the handler is called.
See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686016(v=vs.85).aspx
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Test Suite |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Implement sigINT handler for Window's timeout.exe","status":"New","operating_system":"","component":"Test Suite","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"On linux we current register a sigINT handler and kill the child processed.\r\n\r\nOn Windows we don't. This sometimes leaves dangling processes when the testsuite is interrupted. Causing future failures until the dangling processes are killed.\r\n\r\nWe already specifically create a job group and assign the processors to those jobs. All we have to do is register the handler and kill the process if the handler is called.\r\n\r\nSee https://msdn.microsoft.com/en-us/library/windows/desktop/ms686016(v=vs.85).aspx","type_of_failure":"OtherFailure","blocking":[]} -->AzelAzelhttps://gitlab.haskell.org/ghc/ghc/-/issues/12719master branch broken with alex 3.22019-07-07T18:25:25ZBen Gamarimaster branch broken with alex 3.2The build fails with all sorts of type errors. Need to work out what is going on when there is time.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Versio...The build fails with all sorts of type errors. Need to work out what is going on when there is time.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"master branch broken with alex 3.2","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.2.1","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"bgamari"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"The build fails with all sorts of type errors. Need to work out what is going on when there is time.","type_of_failure":"OtherFailure","blocking":[]} -->8.2.1Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/12718Segmentation fault, runtime representation polymorphism2019-07-07T18:25:25ZIcelandjackSegmentation fault, runtime representation polymorphism```hs
{-# Language RebindableSyntax, NoImplicitPrelude, MagicHash, RankNTypes, PolyKinds, ViewPatterns, TypeInType, FlexibleInstances #-}
import Prelude hiding (Eq (..), Num(..))
import qualified Prelude as P
import GHC.Prim
import GHC....```hs
{-# Language RebindableSyntax, NoImplicitPrelude, MagicHash, RankNTypes, PolyKinds, ViewPatterns, TypeInType, FlexibleInstances #-}
import Prelude hiding (Eq (..), Num(..))
import qualified Prelude as P
import GHC.Prim
import GHC.Types
class Num (a :: TYPE rep) where
(+) :: a -> a -> a
fromInteger :: Integer -> a
instance P.Num a => Num a where
(+) = (P.+)
fromInteger = P.fromInteger
instance Num Int# where (+) = (+#); fromInteger (fromInteger -> I# n) = n
u :: Bool
u = isTrue# v_ where
v_ :: forall rep (a :: TYPE rep). Num a => a
v_ = fromInteger 10
```
segfaults
```hs
$ ./bin/repo/ghc4/inplace/bin/ghc-stage2 --interactive -ignore-dot-ghci /tmp/tMjN.hs
GHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( /tmp/tMjN.hs, interpreted )
Ok, modules loaded: Main.
*Main> u
True
*Main> Segmentation fault (core dumped)
$
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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":"Segmentation fault, runtime representation polymorphism","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{#!hs\r\n{-# Language RebindableSyntax, NoImplicitPrelude, MagicHash, RankNTypes, PolyKinds, ViewPatterns, TypeInType, FlexibleInstances #-}\r\n\r\nimport Prelude hiding (Eq (..), Num(..))\r\nimport qualified Prelude as P\r\nimport GHC.Prim\r\nimport GHC.Types \r\n\r\nclass Num (a :: TYPE rep) where\r\n (+) :: a -> a -> a\r\n fromInteger :: Integer -> a\r\n\r\ninstance P.Num a => Num a where\r\n (+) = (P.+)\r\n fromInteger = P.fromInteger\r\n\r\ninstance Num Int# where (+) = (+#); fromInteger (fromInteger -> I# n) = n\r\n\r\nu :: Bool\r\nu = isTrue# v_ where\r\n v_ :: forall rep (a :: TYPE rep). Num a => a\r\n v_ = fromInteger 10\r\n}}}\r\n\r\nsegfaults\r\n\r\n{{{#!hs\r\n$ ./bin/repo/ghc4/inplace/bin/ghc-stage2 --interactive -ignore-dot-ghci /tmp/tMjN.hs\r\nGHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help\r\n[1 of 1] Compiling Main ( /tmp/tMjN.hs, interpreted )\r\nOk, modules loaded: Main.\r\n*Main> u\r\nTrue\r\n*Main> Segmentation fault (core dumped)\r\n$ \r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/12716Suggest ScopedTypeVariables when type variable not in scope2019-07-07T18:25:26ZEdward Z. YangSuggest ScopedTypeVariables when type variable not in scopeI recently wrote this:
```
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE TypeApplications #-}
module B where
f :: forall a. a -> a
f x = id @a x
```
And was hornswoggled for the better part of five minutes for why "a" wasn't in scope. A...I recently wrote this:
```
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE TypeApplications #-}
module B where
f :: forall a. a -> a
f x = id @a x
```
And was hornswoggled for the better part of five minutes for why "a" wasn't in scope. Answer: you need `ScopedTypeVariables`. A suggestion would be nice.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | goldfire |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Suggest ScopedTypeVariables when type variable not in scope","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["goldfire"],"type":"Bug","description":"I recently wrote this:\r\n\r\n{{{\r\n{-# LANGUAGE ExplicitForAll #-}\r\n{-# LANGUAGE TypeApplications #-}\r\nmodule B where\r\nf :: forall a. a -> a\r\nf x = id @a x\r\n}}}\r\n\r\nAnd was hornswoggled for the better part of five minutes for why \"a\" wasn't in scope. Answer: you need `ScopedTypeVariables`. A suggestion would be nice.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/12715T3994 is intermittently broken on Windows2019-07-07T18:25:26ZBen GamariT3994 is intermittently broken on WindowsThe `T3994` testcase sometimes appears to crash on Windows,
```
+++ ../../libraries/process/tests/T3994.run/T3994.run.stderr.normalised 2016-10-16 03:11:54.601205700 +0000
@@ -0,0 +1,2 @@
+ 1521 [main] sh 5272 child_copy: cygheap read...The `T3994` testcase sometimes appears to crash on Windows,
```
+++ ../../libraries/process/tests/T3994.run/T3994.run.stderr.normalised 2016-10-16 03:11:54.601205700 +0000
@@ -0,0 +1,2 @@
+ 1521 [main] sh 5272 child_copy: cygheap read copy failed, 0x1802FE408..0x180307A08, done 0, windows pid 5272, Win32 error 299
+ 7952 [main] sh 5272 C:/msys64/usr/bin/sh: *** fatal error in forked process - ccalloc would have returned NULL
```
This very well may be an msys issue.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Test Suite |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | Phyx- |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"T3994 is intermittently broken on Windows","status":"New","operating_system":"","component":"Test Suite","related":[],"milestone":"8.2.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["Phyx-"],"type":"Bug","description":"The `T3994` testcase sometimes appears to crash on Windows,\r\n{{{\r\n+++ ../../libraries/process/tests/T3994.run/T3994.run.stderr.normalised 2016-10-16 03:11:54.601205700 +0000\r\n@@ -0,0 +1,2 @@\r\n+ 1521 [main] sh 5272 child_copy: cygheap read copy failed, 0x1802FE408..0x180307A08, done 0, windows pid 5272, Win32 error 299\r\n+ 7952 [main] sh 5272 C:/msys64/usr/bin/sh: *** fatal error in forked process - ccalloc would have returned NULL\r\n\r\n}}}\r\nThis very well may be an msys issue.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/12714T9405 fails on Windows2022-04-08T14:00:09ZBen GamariT9405 fails on WindowsThe `T9405` testcase currently fails on Windows,
```
=====> T9405(normal) 8 of 14 [0, 1, 0]
cd "./rts/T9405.run" && $MAKE -s --no-print-directory T9405
Wrong exit code (expected 0 , actual 2 )
Stdout:
[1 of 1] Compiling Main ...The `T9405` testcase currently fails on Windows,
```
=====> T9405(normal) 8 of 14 [0, 1, 0]
cd "./rts/T9405.run" && $MAKE -s --no-print-directory T9405
Wrong exit code (expected 0 , actual 2 )
Stdout:
[1 of 1] Compiling Main ( T9405.hs, T9405.o )
Linking T9405.exe ...
Stderr:
make[1]: *** [Makefile:50: T9405] Error 1
```
Contrary to what was suggested in [ticket:12004\#comment:120267](https://gitlab.haskell.org//ghc/ghc/issues/12004#note_120267) it looks like the problem is that an empty `.ticky` file is produced. Even increasing the `sleep` time to 10 seconds (after bumping the sleep in `T9405.hs` accordingly) doesn't change this, so I suspect there is a runtime system bug here.8.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/12713Bytes allocated statistic for T10858 differs between Windows and Linux2019-07-07T18:25:26ZBen GamariBytes allocated statistic for T10858 differs between Windows and LinuxStrangely `T10858` seems to pass without any trouble on 64-bit Linux with its current expected "bytes allocated" statistic of 241MB. Strangely, this test allocates 16% less on 64-bit Windows,
```
bytes allocated value is too low:
(If th...Strangely `T10858` seems to pass without any trouble on 64-bit Linux with its current expected "bytes allocated" statistic of 241MB. Strangely, this test allocates 16% less on 64-bit Windows,
```
bytes allocated value is too low:
(If this is because you have improved GHC, please
update the test so that GHC doesn't regress again)
Expected T10858(normal) bytes allocated: 241655120 +/-8%
Lower bound T10858(normal) bytes allocated: 222322710
Upper bound T10858(normal) bytes allocated: 260987530
Actual T10858(normal) bytes allocated: 203567896
Deviation T10858(normal) bytes allocated: -15.8 %
*** unexpected stat test failure for T10858(normal)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Test Suite |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown/Multiple |
| Architecture | Unknown/Multiple |
</details>
<!-- {"blocked_by":[],"summary":"Bytes allocated statistic for T10858 differs between Windows and Linux","status":"New","operating_system":"Unknown/Multiple","component":"Test Suite","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown/Multiple","cc":[""],"type":"Bug","description":"Strangely `T10858` seems to pass without any trouble on 64-bit Linux with its current expected \"bytes allocated\" statistic of 241MB. Strangely, this test allocates 16% less on 64-bit Windows,\r\n{{{\r\nbytes allocated value is too low:\r\n(If this is because you have improved GHC, please\r\nupdate the test so that GHC doesn't regress again)\r\n Expected T10858(normal) bytes allocated: 241655120 +/-8%\r\n Lower bound T10858(normal) bytes allocated: 222322710 \r\n Upper bound T10858(normal) bytes allocated: 260987530 \r\n Actual T10858(normal) bytes allocated: 203567896 \r\n Deviation T10858(normal) bytes allocated: -15.8 %\r\n*** unexpected stat test failure for T10858(normal)\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/12712break011 is broken on Windows2019-07-07T18:25:27ZBen Gamaribreak011 is broken on WindowsThe `break011` testcase fails on Windows with some unexpected differences in stdout.
```
+++ ./ghci.debugger/scripts/break011.run/break011.run.stdout.normalised 2016-10-16 01:57:26.489544400 +0000
@@ -51,6 +51,9 @@
...The `break011` testcase fails on Windows with some unexpected differences in stdout.
```
+++ ./ghci.debugger/scripts/break011.run/break011.run.stdout.normalised 2016-10-16 01:57:26.489544400 +0000
@@ -51,6 +51,9 @@
"foo"
"CallStack (from HasCallStack):
error, called at Test7.hs:<line>:<column> in <package-id>:Main")
-*** Exception: foo
-CallStack (from HasCallStack):
- error, called at Test7.hs:<line>:<column> in <package-id>:Main
+Stopped in <exception thrown>, <unknown>
+_exception :: e = SomeException
+ (ErrorCallWithLocation
+ "foo"
+ "CallStack (from HasCallStack):
+ error, called at Test7.hs:<line>:<column> in <package-id>:Main")
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Test Suite |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | Phyx- |
| Operating system | Unknown/Multiple |
| Architecture | Unknown/Multiple |
</details>
<!-- {"blocked_by":[],"summary":"break011 is broken on Windows","status":"New","operating_system":"Unknown/Multiple","component":"Test Suite","related":[],"milestone":"8.2.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown/Multiple","cc":["Phyx-"],"type":"Bug","description":"The `break011` testcase fails on Windows with some unexpected differences in stdout.\r\n\r\n{{{\r\n+++ ./ghci.debugger/scripts/break011.run/break011.run.stdout.normalised 2016-10-16 01:57:26.489544400 +0000\r\n@@ -51,6 +51,9 @@\r\n \"foo\"\r\n \"CallStack (from HasCallStack):\r\n error, called at Test7.hs:<line>:<column> in <package-id>:Main\")\r\n-*** Exception: foo\r\n-CallStack (from HasCallStack):\r\n- error, called at Test7.hs:<line>:<column> in <package-id>:Main\r\n+Stopped in <exception thrown>, <unknown>\r\n+_exception :: e = SomeException\r\n+ (ErrorCallWithLocation\r\n+ \"foo\"\r\n+ \"CallStack (from HasCallStack):\r\n+ error, called at Test7.hs:<line>:<column> in <package-id>:Main\")\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.4.1https://gitlab.haskell.org/ghc/ghc/-/issues/12711GHC Internal error, unboxed sums2019-07-07T18:25:27ZIcelandjackGHC Internal error, unboxed sums```
$ ./ghc-stage2 -ignore-dot-ghci --interactive
GHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help
Prelude> :set -XUnboxedSums
Prelude> :kind (# _ | _ #)
<interactive>:1:4: error:
• GHC internal error: ‘_’ is no...```
$ ./ghc-stage2 -ignore-dot-ghci --interactive
GHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help
Prelude> :set -XUnboxedSums
Prelude> :kind (# _ | _ #)
<interactive>:1:4: error:
• GHC internal error: ‘_’ is not in scope during type checking, but it passed the renamer
tcl_env of environment: []
• In the type ‘(# _ | _ #)’
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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 Internal error, unboxed sums","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":["UnboxedSums"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\r\n$ ./ghc-stage2 -ignore-dot-ghci --interactive\r\nGHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help\r\nPrelude> :set -XUnboxedSums \r\nPrelude> :kind (# _ | _ #)\r\n\r\n<interactive>:1:4: 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 type ‘(# _ | _ #)’\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.2.1Ömer Sinan AğacanÖmer Sinan Ağacanhttps://gitlab.haskell.org/ghc/ghc/-/issues/12709GHC panic2021-06-28T14:06:02ZIcelandjackGHC panicI get
```
$ ./ghc-stage2 -ignore-dot-ghci --interactive /tmp/tEZm.hs
GHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( /tmp/tEZm.hs, interpreted )
ghc-stage2: panic! (the 'impossi...I get
```
$ ./ghc-stage2 -ignore-dot-ghci --interactive /tmp/tEZm.hs
GHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( /tmp/tEZm.hs, interpreted )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20160930 for x86_64-unknown-linux):
kindPrimRep.go
rep_a13E
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1076:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1080:37 in ghc:Outputable
pprPanic, called at compiler/simplStg/RepType.hs:369:9 in ghc:RepType
kindPrimRep, called at compiler/simplStg/RepType.hs:337:18 in ghc:RepType
typePrimRep, called at compiler/ghci/ByteCodeGen.hs:1541:15 in ghc:ByteCodeGen
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
>
```
running
```hs
{-# Language MagicHash, PolyKinds, ViewPatterns, TypeInType, RebindableSyntax, NoImplicitPrelude #-}
import GHC.Types
import Prelude hiding (Num (..))
import qualified Prelude as P
import GHC.Prim
data BoxUnbox = BUB Int Int#
class Num (a :: TYPE rep) where
(+) :: a -> a -> a
fromInteger :: Integer -> a
instance Num Int where
(+) = (P.+)
fromInteger = P.fromInteger
instance Num Int# where
(+) = (+#)
fromInteger (fromInteger -> I# n) = n
a :: BoxUnbox
a = let u :: Num (a :: TYPE rep) => a
u = 1 + 2 + 3 + 4
in
BUB u u
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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 panic","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I get\r\n\r\n{{{\r\n$ ./ghc-stage2 -ignore-dot-ghci --interactive /tmp/tEZm.hs\r\nGHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help\r\n[1 of 1] Compiling Main ( /tmp/tEZm.hs, interpreted )\r\nghc-stage2: panic! (the 'impossible' happened)\r\n (GHC version 8.1.20160930 for x86_64-unknown-linux):\r\n kindPrimRep.go\r\n rep_a13E\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1076:58 in ghc:Outputable\r\n callStackDoc, called at compiler/utils/Outputable.hs:1080:37 in ghc:Outputable\r\n pprPanic, called at compiler/simplStg/RepType.hs:369:9 in ghc:RepType\r\n kindPrimRep, called at compiler/simplStg/RepType.hs:337:18 in ghc:RepType\r\n typePrimRep, called at compiler/ghci/ByteCodeGen.hs:1541:15 in ghc:ByteCodeGen\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n> \r\n}}}\r\n\r\nrunning \r\n\r\n{{{#!hs\r\n{-# Language MagicHash, PolyKinds, ViewPatterns, TypeInType, RebindableSyntax, NoImplicitPrelude #-}\r\n\r\nimport GHC.Types\r\nimport Prelude hiding (Num (..))\r\nimport qualified Prelude as P\r\nimport GHC.Prim\r\n\r\ndata BoxUnbox = BUB Int Int#\r\n\r\nclass Num (a :: TYPE rep) where\r\n (+) :: a -> a -> a\r\n\r\n fromInteger :: Integer -> a\r\n\r\ninstance Num Int where\r\n (+) = (P.+)\r\n fromInteger = P.fromInteger\r\n\r\ninstance Num Int# where\r\n (+) = (+#)\r\n fromInteger (fromInteger -> I# n) = n\r\n\r\na :: BoxUnbox\r\na = let u :: Num (a :: TYPE rep) => a\r\n u = 1 + 2 + 3 + 4\r\n in\r\n BUB u u\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/12707Add contributed performance testcase2019-07-07T18:25:28ZBen GamariAdd contributed performance testcasephadej was kind enough to offer a compile-time performance testcase. Add it to the testsuite or perhaps nofib.
https://gist.github.com/phadej/554c2cc7e06b98142dc0fbadb6d3a47f
<details><summary>Trac metadata</summary>
| Trac field ...phadej was kind enough to offer a compile-time performance testcase. Add it to the testsuite or perhaps nofib.
https://gist.github.com/phadej/554c2cc7e06b98142dc0fbadb6d3a47f
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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":"Add contributed performance testcase","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.2.1","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"bgamari"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"phadej was kind enough to offer a compile-time performance testcase. Add it to the testsuite or perhaps nofib.\r\n\r\nhttps://gist.github.com/phadej/554c2cc7e06b98142dc0fbadb6d3a47f","type_of_failure":"OtherFailure","blocking":[]} -->8.2.1Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/12702Don't warn about redundant constraints for necessary2019-07-07T18:25:29ZEric CrockettDon't warn about redundant constraints for necessaryIn the attached example, GHC warns that the constraint on line 16 of Main.hs is redundant.
```
• Redundant constraint: e ~ FGCD r s
• In the type signature for:
foo :: (e ~ FGCD r e', e' ~ (e * (s / r)), e ~ FGCD r s) =>
...In the attached example, GHC warns that the constraint on line 16 of Main.hs is redundant.
```
• Redundant constraint: e ~ FGCD r s
• In the type signature for:
foo :: (e ~ FGCD r e', e' ~ (e * (s / r)), e ~ FGCD r s) =>
Proxy s -> Proxy r -> ()
```
However, when I remove that constraint, I get the following error:
```
• Occurs check: cannot construct the infinite type:
t0 ~ Factored.FMul (FGCD r t0) (Factored.FDiv s r)
The type variable ‘t0’ is ambiguous
• In the ambiguity check for ‘foo’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature:
foo :: forall e e' r s.
(e ~ FGCD r e', e' ~ (e * (s / r))) => Proxy s -> Proxy r -> ()
```
I'm not entirely sure if the error is correct or not; I can't figure out what it's getting on about.
So: if the constraint is required to make `foo` compile, then it is most certainly *not* redundant, and there shouldn't be a warning suggesting its removal. If the constraint really isn't required, then the error is a bug.
(I apologize for the second bug involving singletons in as many days; I simply don't know an easy way to remove that dependency.)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1 |
| 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":"Don't warn about redundant constraints for necessary","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In the attached example, GHC warns that the constraint on line 16 of Main.hs is redundant. \r\n\r\n{{{\r\n• Redundant constraint: e ~ FGCD r s\r\n• In the type signature for:\r\n foo :: (e ~ FGCD r e', e' ~ (e * (s / r)), e ~ FGCD r s) =>\r\n Proxy s -> Proxy r -> ()\r\n}}}\r\n\r\nHowever, when I remove that constraint, I get the following error:\r\n\r\n{{{\r\n• Occurs check: cannot construct the infinite type:\r\n t0 ~ Factored.FMul (FGCD r t0) (Factored.FDiv s r)\r\n The type variable ‘t0’ is ambiguous\r\n• In the ambiguity check for ‘foo’\r\n To defer the ambiguity check to use sites, enable AllowAmbiguousTypes\r\n In the type signature:\r\n foo :: forall e e' r s.\r\n (e ~ FGCD r e', e' ~ (e * (s / r))) => Proxy s -> Proxy r -> ()\r\n}}}\r\n\r\nI'm not entirely sure if the error is correct or not; I can't figure out what it's getting on about. \r\n\r\nSo: if the constraint is required to make `foo` compile, then it is most certainly ''not'' redundant, and there shouldn't be a warning suggesting its removal. If the constraint really isn't required, then the error is a bug.\r\n\r\n(I apologize for the second bug involving singletons in as many days; I simply don't know an easy way to remove that dependency.)","type_of_failure":"OtherFailure","blocking":[]} -->8.0.2