GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2021-06-11T22:13:10Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/17846runtimeRepPrimRep panic when combining UnboxedTuples with -fhpc or {-prof,-fp...2021-06-11T22:13:10ZRyan ScottruntimeRepPrimRep panic when combining UnboxedTuples with -fhpc or {-prof,-fprof-auto}(Originally observed in !2703.)
The following program:
```hs
{-# LANGUAGE UnboxedTuples #-}
module Bug where
makeUTup2 = (#,#)
```
Panics on GHC 8.0.2 or later if you compile it with `-fhpc`:
```
$ /opt/ghc/8.8.2/bin/ghc -fhpc -fforc...(Originally observed in !2703.)
The following program:
```hs
{-# LANGUAGE UnboxedTuples #-}
module Bug where
makeUTup2 = (#,#)
```
Panics on GHC 8.0.2 or later if you compile it with `-fhpc`:
```
$ /opt/ghc/8.8.2/bin/ghc -fhpc -fforce-recomp Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.8.2 for x86_64-unknown-linux):
runtimeRepPrimRep
typePrimRep (a_12 :: TYPE k0_10)
k0_10
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1159:37 in ghc:Outputable
pprPanic, called at compiler/simplStg/RepType.hs:365:5 in ghc:RepType
```
Or, alternatively, with the combination of `-prof` and `-fprof-auto`:
```
$ /opt/ghc/8.8.2/bin/ghc -prof -fprof-auto -fforce-recomp Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.8.2 for x86_64-unknown-linux):
runtimeRepPrimRep
typePrimRep (a_12 :: TYPE k0_10)
k0_10
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1159:37 in ghc:Outputable
pprPanic, called at compiler/simplStg/RepType.hs:365:5 in ghc:RepType
```
A workaround is to manually eta-expand `mkUTup2`:
```hs
{-# LANGUAGE UnboxedTuples #-}
module Bug where
makeUTup2 x y = (# x, y #)
```https://gitlab.haskell.org/ghc/ghc/-/issues/18653Weird printing of promoted unboxed tuples2022-11-30T21:59:44ZRichard Eisenbergrae@richarde.devWeird printing of promoted unboxed tuplesIn reviewing !3966, I came across this interaction with GHCi:
```
> :kind! '(#,#) Int Bool
'(#,#) Int Bool :: (# *, * #)
= '(# *, Int, Bool #)
```
What's that `*` doing in the final line? It shouldn't be there.In reviewing !3966, I came across this interaction with GHCi:
```
> :kind! '(#,#) Int Bool
'(#,#) Int Bool :: (# *, * #)
= '(# *, Int, Bool #)
```
What's that `*` doing in the final line? It shouldn't be there.https://gitlab.haskell.org/ghc/ghc/-/issues/19609testsuite: UnboxedTuples fails on powerpc64le2022-01-03T16:39:48ZPeter Trommlerptrommler@acm.orgtestsuite: UnboxedTuples fails on powerpc64le```
+++ ghci/should_run/UnboxedTuples/UnboxedTuples.run/UnboxedTuples.run.stderr.normalised 2021-03-26 11:39:02.060000000 +0000
@@ -0,0 +1,4 @@
+
+UnboxedTuples:6:30:
+ Not in scope: ‘Main.main’
+ No module named ‘Main’ is imported...```
+++ ghci/should_run/UnboxedTuples/UnboxedTuples.run/UnboxedTuples.run.stderr.normalised 2021-03-26 11:39:02.060000000 +0000
@@ -0,0 +1,4 @@
+
+UnboxedTuples:6:30:
+ Not in scope: ‘Main.main’
+ No module named ‘Main’ is imported.
```
RTS linker is not implemented on this platform. Could this be the root cause of this error?
For more details see [build log](https://gitlab.haskell.org/trommler/ghc/-/pipelines/33558).https://gitlab.haskell.org/ghc/ghc/-/issues/22293Bad representation-polymorphic desugaring with `noinline`2022-10-18T20:51:53ZMatthew Cravenclyring@gmail.comBad representation-polymorphic desugaring with `noinline`## Summary
Attempting to compile the following program with ghc-9.4.2 results in a panic:
```haskell
{-# LANGUAGE UnboxedTuples #-}
module Test where
import GHC.Exts (noinline)
test :: a -> b -> (# a, b #)
test = noinline (#,#)
```
R...## Summary
Attempting to compile the following program with ghc-9.4.2 results in a panic:
```haskell
{-# LANGUAGE UnboxedTuples #-}
module Test where
import GHC.Exts (noinline)
test :: a -> b -> (# a, b #)
test = noinline (#,#)
```
Running with `-dlint` makes clear that the special desugaring for `noinline` has separated `(#,#)` from its type arguments, resulting in its value arguments no longer having fixed representation.
## Environment
* GHC version used: 9.4.2sheafsam.derbyshire@gmail.comsheafsam.derbyshire@gmail.com