GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:03:07Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/15755randomRIO panic on (GHC version 8.4.3 for x86_64-apple-darwin)2019-07-07T18:03:07ZcmalrandomRIO panic on (GHC version 8.4.3 for x86_64-apple-darwin) randomRIO (1,100)
ghc: panic! (the 'impossible' happened)
> (GHC version 8.4.3 for x86_64-apple-darwin):
nameModule
system $dShow_a78p
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputab... randomRIO (1,100)
ghc: panic! (the 'impossible' happened)
> (GHC version 8.4.3 for x86_64-apple-darwin):
nameModule
system $dShow_a78p
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
> pprPanic, called at compiler/basicTypes/Name.hs:241:3 in ghc:Name
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabughttps://gitlab.haskell.org/ghc/ghc/-/issues/15754Move free variable computation to after STG passes2019-07-07T18:03:07ZBen GamariMove free variable computation to after STG passesCurrently (we believe) `CoreToStg` is responsible for computing free variables. However, later STG transformations may invalidate this information.
It would make more sense to defer FV computation until the end of the STG pipeline.Currently (we believe) `CoreToStg` is responsible for computing free variables. However, later STG transformations may invalidate this information.
It would make more sense to defer FV computation until the end of the STG pipeline.8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/15753Inconsistent pattern-match warnings when using guards versus case expressions2019-09-18T14:14:54ZRyan ScottInconsistent pattern-match warnings when using guards versus case expressionsConsider the following code (apologies for the rather non-minimal example):
```hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTyp...Consider the following code (apologies for the rather non-minimal example):
```hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wall -Wno-unticked-promoted-constructors #-}
module Bug where
import Data.Kind
import Data.Type.Bool
import Data.Type.Equality ((:~:)(..))
import Data.Void
data family Sing :: forall k. k -> Type
data instance Sing :: Bool -> Type where
SFalse :: Sing False
STrue :: Sing True
data instance Sing :: forall a. [a] -> Type where
SNil :: Sing '[]
SCons :: Sing x -> Sing xs -> Sing (x:xs)
data instance Sing :: forall a b. (a, b) -> Type where
STuple2 :: Sing x -> Sing y -> Sing '(x, y)
newtype instance Sing (f :: k1 ~> k2) =
SLambda { (@@) :: forall t. Sing t -> Sing (f @@ t) }
data TyFun :: Type -> Type -> Type
type a ~> b = TyFun a b -> Type
infixr 0 ~>
type family (f :: k1 ~> k2) @@ (x :: k1) :: k2
infixl 9 @@
newtype Map k v = MkMap [(k, v)]
data instance Sing :: forall k v. Map k v -> Type where
SMkMap :: Sing x -> Sing (MkMap x)
type family MapEmpty :: Map k v where
MapEmpty = MkMap '[]
type family MapInsertWith (f :: v ~> v ~> v) (new_k :: k) (new_v :: v) (m :: Map k v) :: Map k v where
MapInsertWith _ new_k new_v (MkMap '[]) = MkMap '[ '(new_k, new_v)]
MapInsertWith f new_k new_v (MkMap ('(old_k,old_v):old_kvs)) =
If (old_k == new_k)
(MkMap ('(new_k,f @@ new_v @@ old_v):old_kvs))
(Case (MapInsertWith f new_k new_v (MkMap old_kvs)) old_k old_v)
type family Case (m :: Map k v) (old_k :: k) (old_v :: v) :: Map k v where
Case (MkMap kvs) old_k old_v = MkMap ('(old_k,old_v) : kvs)
sMapInsertWith :: forall k v (f :: v ~> v ~> v) (new_k :: k) (new_v :: v) (m :: Map k v).
SEq k
=> Sing f -> Sing new_k -> Sing new_v -> Sing m
-> Sing (MapInsertWith f new_k new_v m)
sMapInsertWith _ snew_k snew_v (SMkMap SNil) = SMkMap (STuple2 snew_k snew_v `SCons` SNil)
sMapInsertWith sf snew_k snew_v (SMkMap (STuple2 sold_k sold_v `SCons` sold_kvs)) =
case sold_k %== snew_k of
STrue -> SMkMap (STuple2 snew_k (sf @@ snew_v @@ sold_v) `SCons` sold_kvs)
SFalse ->
case sMapInsertWith sf snew_k snew_v (SMkMap sold_kvs) of
SMkMap skvs -> SMkMap (STuple2 sold_k sold_v `SCons` skvs)
class PEq a where
type (x :: a) == (y :: a) :: Bool
class SEq a where
(%==) :: forall (x :: a) (y :: a).
Sing x -> Sing y -> Sing (x == y)
mapInsertWithNonEmpty1 :: forall k v (f :: v ~> v ~> v) (old_k :: k) (old_v :: v) (old_kvs :: [(k,v)])
(new_k :: k) (new_v :: v) (m :: Map k v).
SEq k
=> Sing f -> Sing new_k -> Sing new_v -> Sing m
-> m :~: MkMap ('(old_k,old_v) : old_kvs)
-> MapInsertWith f new_k new_v m :~: MapEmpty
-> Void
mapInsertWithNonEmpty1 sf snew_k snew_v (SMkMap sm) Refl Refl
| STuple2 sold_k _ `SCons` sold_kvs <- sm
, SFalse <- sold_k %== snew_k
= case sMapInsertWith sf snew_k snew_v (SMkMap sold_kvs) of {}
mapInsertWithNonEmpty2 :: forall k v (f :: v ~> v ~> v) (old_k :: k) (old_v :: v) (old_kvs :: [(k,v)])
(new_k :: k) (new_v :: v) (m :: Map k v).
SEq k
=> Sing f -> Sing new_k -> Sing new_v -> Sing m
-> m :~: MkMap ('(old_k,old_v) : old_kvs)
-> MapInsertWith f new_k new_v m :~: MapEmpty
-> Void
mapInsertWithNonEmpty2 sf snew_k snew_v (SMkMap sm) Refl Refl
| STuple2 sold_k _ `SCons` sold_kvs <- sm
= case sold_k %== snew_k of
SFalse ->
case sMapInsertWith sf snew_k snew_v (SMkMap sold_kvs) of {}
```
If you compile this with GHC 8.6.1 or later, you'll notice something interesting happening with the pattern-match coverage checker warnings:
```
$ /opt/ghc/8.6.1/bin/ghci Bug.hs
GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Bug ( Bug.hs, interpreted )
Bug.hs:78:1: warning: [-Wincomplete-patterns]
Pattern match(es) are non-exhaustive
In an equation for ‘mapInsertWithNonEmpty1’:
Patterns not matched: _ _ _ (SMkMap _) Refl Refl
|
78 | mapInsertWithNonEmpty1 sf snew_k snew_v (SMkMap sm) Refl Refl
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
Ok, one module loaded.
```
`mapInsertWithNonEmpty1` is deemed non-exhaustive, but `mapInsertWithNonEmpty2` is deemed exhaustive. However, the code for the two functions are functionally identical—the only difference is that `mapInsertWithNonEmpty1` uses one more pattern guard than `mapInsertWithNonEmpty2` does.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Inconsistent pattern-match warnings when using guards versus case expressions","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":["PatternMatchWarnings"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Consider the following code (apologies for the rather non-minimal example):\r\n\r\n{{{#!hs\r\n{-# LANGUAGE DataKinds #-}\r\n{-# LANGUAGE EmptyCase #-}\r\n{-# LANGUAGE GADTs #-}\r\n{-# LANGUAGE PolyKinds #-}\r\n{-# LANGUAGE RankNTypes #-}\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\n{-# LANGUAGE TypeOperators #-}\r\n{-# LANGUAGE UndecidableInstances #-}\r\n{-# OPTIONS_GHC -Wall -Wno-unticked-promoted-constructors #-}\r\nmodule Bug where\r\n\r\nimport Data.Kind\r\nimport Data.Type.Bool\r\nimport Data.Type.Equality ((:~:)(..))\r\nimport Data.Void\r\n\r\ndata family Sing :: forall k. k -> Type\r\ndata instance Sing :: Bool -> Type where\r\n SFalse :: Sing False\r\n STrue :: Sing True\r\ndata instance Sing :: forall a. [a] -> Type where\r\n SNil :: Sing '[]\r\n SCons :: Sing x -> Sing xs -> Sing (x:xs)\r\ndata instance Sing :: forall a b. (a, b) -> Type where\r\n STuple2 :: Sing x -> Sing y -> Sing '(x, y)\r\nnewtype instance Sing (f :: k1 ~> k2) =\r\n SLambda { (@@) :: forall t. Sing t -> Sing (f @@ t) }\r\n\r\ndata TyFun :: Type -> Type -> Type\r\ntype a ~> b = TyFun a b -> Type\r\ninfixr 0 ~>\r\ntype family (f :: k1 ~> k2) @@ (x :: k1) :: k2\r\ninfixl 9 @@\r\n\r\nnewtype Map k v = MkMap [(k, v)]\r\ndata instance Sing :: forall k v. Map k v -> Type where\r\n SMkMap :: Sing x -> Sing (MkMap x)\r\n\r\ntype family MapEmpty :: Map k v where\r\n MapEmpty = MkMap '[]\r\n\r\ntype family MapInsertWith (f :: v ~> v ~> v) (new_k :: k) (new_v :: v) (m :: Map k v) :: Map k v where\r\n MapInsertWith _ new_k new_v (MkMap '[]) = MkMap '[ '(new_k, new_v)]\r\n MapInsertWith f new_k new_v (MkMap ('(old_k,old_v):old_kvs)) =\r\n If (old_k == new_k)\r\n (MkMap ('(new_k,f @@ new_v @@ old_v):old_kvs))\r\n (Case (MapInsertWith f new_k new_v (MkMap old_kvs)) old_k old_v)\r\n\r\ntype family Case (m :: Map k v) (old_k :: k) (old_v :: v) :: Map k v where\r\n Case (MkMap kvs) old_k old_v = MkMap ('(old_k,old_v) : kvs)\r\n\r\nsMapInsertWith :: forall k v (f :: v ~> v ~> v) (new_k :: k) (new_v :: v) (m :: Map k v).\r\n SEq k\r\n => Sing f -> Sing new_k -> Sing new_v -> Sing m\r\n -> Sing (MapInsertWith f new_k new_v m)\r\nsMapInsertWith _ snew_k snew_v (SMkMap SNil) = SMkMap (STuple2 snew_k snew_v `SCons` SNil)\r\nsMapInsertWith sf snew_k snew_v (SMkMap (STuple2 sold_k sold_v `SCons` sold_kvs)) =\r\n case sold_k %== snew_k of\r\n STrue -> SMkMap (STuple2 snew_k (sf @@ snew_v @@ sold_v) `SCons` sold_kvs)\r\n SFalse ->\r\n case sMapInsertWith sf snew_k snew_v (SMkMap sold_kvs) of\r\n SMkMap skvs -> SMkMap (STuple2 sold_k sold_v `SCons` skvs)\r\n\r\nclass PEq a where\r\n type (x :: a) == (y :: a) :: Bool\r\nclass SEq a where\r\n (%==) :: forall (x :: a) (y :: a).\r\n Sing x -> Sing y -> Sing (x == y)\r\n\r\nmapInsertWithNonEmpty1 :: forall k v (f :: v ~> v ~> v) (old_k :: k) (old_v :: v) (old_kvs :: [(k,v)])\r\n (new_k :: k) (new_v :: v) (m :: Map k v).\r\n SEq k\r\n => Sing f -> Sing new_k -> Sing new_v -> Sing m\r\n -> m :~: MkMap ('(old_k,old_v) : old_kvs)\r\n -> MapInsertWith f new_k new_v m :~: MapEmpty\r\n -> Void\r\nmapInsertWithNonEmpty1 sf snew_k snew_v (SMkMap sm) Refl Refl\r\n | STuple2 sold_k _ `SCons` sold_kvs <- sm\r\n , SFalse <- sold_k %== snew_k\r\n = case sMapInsertWith sf snew_k snew_v (SMkMap sold_kvs) of {}\r\n\r\nmapInsertWithNonEmpty2 :: forall k v (f :: v ~> v ~> v) (old_k :: k) (old_v :: v) (old_kvs :: [(k,v)])\r\n (new_k :: k) (new_v :: v) (m :: Map k v).\r\n SEq k\r\n => Sing f -> Sing new_k -> Sing new_v -> Sing m\r\n -> m :~: MkMap ('(old_k,old_v) : old_kvs)\r\n -> MapInsertWith f new_k new_v m :~: MapEmpty\r\n -> Void\r\nmapInsertWithNonEmpty2 sf snew_k snew_v (SMkMap sm) Refl Refl\r\n | STuple2 sold_k _ `SCons` sold_kvs <- sm\r\n = case sold_k %== snew_k of\r\n SFalse ->\r\n case sMapInsertWith sf snew_k snew_v (SMkMap sold_kvs) of {}\r\n}}}\r\n\r\nIf you compile this with GHC 8.6.1 or later, you'll notice something interesting happening with the pattern-match coverage checker warnings:\r\n\r\n{{{\r\n$ /opt/ghc/8.6.1/bin/ghci Bug.hs\r\nGHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help\r\nLoaded GHCi configuration from /home/rgscott/.ghci\r\n[1 of 1] Compiling Bug ( Bug.hs, interpreted )\r\n\r\nBug.hs:78:1: warning: [-Wincomplete-patterns]\r\n Pattern match(es) are non-exhaustive\r\n In an equation for ‘mapInsertWithNonEmpty1’:\r\n Patterns not matched: _ _ _ (SMkMap _) Refl Refl\r\n |\r\n78 | mapInsertWithNonEmpty1 sf snew_k snew_v (SMkMap sm) Refl Refl\r\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...\r\nOk, one module loaded.\r\n}}}\r\n\r\n`mapInsertWithNonEmpty1` is deemed non-exhaustive, but `mapInsertWithNonEmpty2` is deemed exhaustive. However, the code for the two functions are functionally identical—the only difference is that `mapInsertWithNonEmpty1` uses one more pattern guard than `mapInsertWithNonEmpty2` does.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Sebastian GrafSebastian Grafhttps://gitlab.haskell.org/ghc/ghc/-/issues/15750Investigate haddock.base perf test2019-07-07T18:03:08ZRichard Eisenbergrae@richarde.devInvestigate haddock.base perf testI've seen failures in the `haddock.base` perf test when making changes that really should have no effect on performance. My guess is that this perf test is sitting right on the line of the acceptable range. We should confirm this hunch a...I've seen failures in the `haddock.base` perf test when making changes that really should have no effect on performance. My guess is that this perf test is sitting right on the line of the acceptable range. We should confirm this hunch and then update the values to recenter the range.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Investigate haddock.base perf test","status":"New","operating_system":"","component":"Test Suite","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"I've seen failures in the `haddock.base` perf test when making changes that really should have no effect on performance. My guess is that this perf test is sitting right on the line of the acceptable range. We should confirm this hunch and then update the values to recenter the range.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/15749Long Harbormaster builds2019-07-07T18:03:09ZKrzysztof GogolewskiLong Harbormaster buildsHarbormaster builds sometimes take too long and are not terminated. For example, the following builds have been running for over 2 days:
https://phabricator.haskell.org/harbormaster/build/54452/
https://phabricator.haskell.org/harborma...Harbormaster builds sometimes take too long and are not terminated. For example, the following builds have been running for over 2 days:
https://phabricator.haskell.org/harbormaster/build/54452/
https://phabricator.haskell.org/harbormaster/build/54477/
https://phabricator.haskell.org/harbormaster/build/54485/
We should have some timeout (or lower the threshold if it's already present).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.1 |
| 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":"Long Harbormaster builds","status":"New","operating_system":"","component":"Continuous Integration","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"bgamari"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Harbormaster builds sometimes take too long and are not terminated. For example, the following builds have been running for over 2 days:\r\n\r\nhttps://phabricator.haskell.org/harbormaster/build/54452/\r\n\r\nhttps://phabricator.haskell.org/harbormaster/build/54477/\r\n\r\nhttps://phabricator.haskell.org/harbormaster/build/54485/\r\n\r\nWe should have some timeout (or lower the threshold if it's already present).","type_of_failure":"OtherFailure","blocking":[]} -->Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/15748panic2019-07-07T18:03:09Zawfpanic```
GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help
Prelude> :print getChar >>= return
ghc.exe: panic! (the 'impossible' happened)
(GHC version 8.4.3 for x86_64-unknown-mingw32):
isUnliftedType
t1_a1tM[rt] :: TY...```
GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help
Prelude> :print getChar >>= return
ghc.exe: panic! (the 'impossible' happened)
(GHC version 8.4.3 for x86_64-unknown-mingw32):
isUnliftedType
t1_a1tM[rt] :: TYPE t_a1tL[rt]
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler\utils\Outputable.hs:1150:37 in ghc:Outputable
pprPanic, called at compiler\\types\\Type.hs:1939:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"panic","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\r\nGHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help\r\nPrelude> :print getChar >>= return\r\nghc.exe: panic! (the 'impossible' happened)\r\n (GHC version 8.4.3 for x86_64-unknown-mingw32):\r\n isUnliftedType\r\n t1_a1tM[rt] :: TYPE t_a1tL[rt]\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n callStackDoc, called at compiler\\utils\\Outputable.hs:1150:37 in ghc:Outputable\r\n pprPanic, called at compiler\\\\types\\\\Type.hs:1939:10 in ghc:Type\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/15747GHC panics when builds for arm as: ghc-stage1: panic! (the 'impossible' happe...2019-07-07T18:03:09ZSergei TrofimovichGHC panics when builds for arm as: ghc-stage1: panic! (the 'impossible' happened): padLiveArgs -- i > regNum ??ghc-HEAD fails build as:
```
$ LANG=C make
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for 'phase_0_builds'.
===--- building phase 1
make --no-print-directory -f ghc.mk ...ghc-HEAD fails build as:
```
$ LANG=C make
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for 'phase_0_builds'.
===--- building phase 1
make --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for 'phase_1_builds'.
===--- building final phase
make --no-print-directory -f ghc.mk phase=final all
"inplace/bin/ghc-stage1" -static -H32m -O -O0 -Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -DFS_NAMESPACE=rts -this-unit-id rts -dcmm-lint -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen -O2 -Wcpp-undef -Wnoncanonical-monad-instances -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o
You are using an unsupported version of LLVM!
Currently only 6.0 is supported.
We will try though...
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.7.20181014 for arm-unknown-linux):
padLiveArgs -- i > regNum ??(2,1)
CallStack (from HasCallStack):
error, called at compiler/llvmGen/LlvmCodeGen/Base.hs:194:27 in ghc:LlvmCodeGen.Base
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
make[1]: *** [rts/ghc.mk:318: rts/dist/build/HeapStackCheck.o] Error 1
make: *** [Makefile:127: all] Error 2
```
The suspect is: https://phabricator.haskell.org/D5190
GHC is built for **armv7a-unknown-linux-gnueabihf** target.
```
inplace/bin/ghc-stage1 --info
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts"," -fwrapv -fno-builtin")
,("C compiler command","armv7a-unknown-linux-gnueabihf-gcc")
,("C compiler flags"," -marm -fno-stack-protector")
,("C compiler link flags"," -Wl,-z,noexecstack")
,("C compiler supports -no-pie","YES")
,("Haskell CPP command","armv7a-unknown-linux-gnueabihf-gcc")
,("Haskell CPP flags","-E -undef -traditional")
,("ld command","armv7a-unknown-linux-gnueabihf-ld.gold")
,("ld flags"," -z noexecstack")
,("ld supports compact unwind","YES")
,("ld supports build-id","YES")
,("ld supports filelist","NO")
,("ld is GNU ld","YES")
,("ar command","armv7a-unknown-linux-gnueabihf-ar")
,("ar flags","q")
,("ar supports at file","YES")
,("ranlib command","armv7a-unknown-linux-gnueabihf-ranlib")
,("touch command","touch")
,("dllwrap command","armv7a-unknown-linux-gnueabihf-dllwrap")
,("windres command","armv7a-unknown-linux-gnueabihf-windres")
,("libtool command","libtool")
,("perl command","/usr/bin/perl")
,("cross compiling","YES")
,("target os","OSLinux")
,("target arch","ArchARM {armISA = ARMv7, armISAExt = [VFPv3,NEON], armABI = HARD}")
,("target word size","4")
,("target has GNU nonexec stack","True")
,("target has .ident directive","True")
,("target has subsections via symbols","False")
,("target has RTS linker","YES")
,("Unregisterised","NO")
,("LLVM llc command","llc")
,("LLVM opt command","opt")
,("LLVM clang command","clang")
,("Project version","8.7.20181014")
,("Project Git commit id","4a79ae580698ec635a6edd2b56958af2682511dd")
,("Booter version","8.4.2")
,("Stage","1")
,("Build platform","x86_64-unknown-linux")
,("Host platform","x86_64-unknown-linux")
,("Target platform","arm-unknown-linux")
,("Have interpreter","YES")
,("Object splitting supported","NO")
,("Have native code generator","NO")
,("Support SMP","YES")
,("Tables next to code","YES")
,("RTS ways","l debug thr thr_debug thr_l dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn ")
,("RTS expects libdw","NO")
,("Support dynamic-too","YES")
,("Support parallel --make","YES")
,("Support reexported-modules","YES")
,("Support thinning and renaming package flags","YES")
,("Support Backpack","YES")
,("Requires unified installed package IDs","YES")
,("Uses package keys","YES")
,("Uses unit IDs","YES")
,("Dynamic by default","NO")
,("GHC Dynamic","NO")
,("GHC Profiled","NO")
,("Leading underscore","NO")
,("Debug on","False")
,("LibDir","/tmp/portage/cross-armv7a-unknown-linux-gnueabihf/ghc-9999/work/ghc-9999/inplace/lib")
,("Global Package DB","/tmp/portage/cross-armv7a-unknown-linux-gnueabihf/ghc-9999/work/ghc-9999/inplace/lib/package.conf.d")
]
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | bgamari, kavon |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC panics when builds for arm as: ghc-stage1: panic! (the 'impossible' happened): padLiveArgs -- i > regNum ??","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["bgamari","kavon"],"type":"Bug","description":"ghc-HEAD fails build as:\r\n{{{\r\n$ LANG=C make\r\n===--- building phase 0\r\nmake --no-print-directory -f ghc.mk phase=0 phase_0_builds\r\nmake[1]: Nothing to be done for 'phase_0_builds'.\r\n===--- building phase 1\r\nmake --no-print-directory -f ghc.mk phase=1 phase_1_builds\r\nmake[1]: Nothing to be done for 'phase_1_builds'.\r\n===--- building final phase\r\nmake --no-print-directory -f ghc.mk phase=final all\r\n\"inplace/bin/ghc-stage1\" -static -H32m -O -O0 -Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -DFS_NAMESPACE=rts -this-unit-id rts -dcmm-lint -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen -O2 -Wcpp-undef -Wnoncanonical-monad-instances -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o\r\nYou are using an unsupported version of LLVM!\r\nCurrently only 6.0 is supported.\r\nWe will try though...\r\nghc-stage1: panic! (the 'impossible' happened)\r\n (GHC version 8.7.20181014 for arm-unknown-linux):\r\n padLiveArgs -- i > regNum ??(2,1)\r\nCallStack (from HasCallStack):\r\n error, called at compiler/llvmGen/LlvmCodeGen/Base.hs:194:27 in ghc:LlvmCodeGen.Base\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\nmake[1]: *** [rts/ghc.mk:318: rts/dist/build/HeapStackCheck.o] Error 1\r\nmake: *** [Makefile:127: all] Error 2\r\n}}}\r\n\r\nThe suspect is: https://phabricator.haskell.org/D5190\r\n\r\nGHC is built for '''armv7a-unknown-linux-gnueabihf''' target.\r\n\r\n{{{\r\ninplace/bin/ghc-stage1 --info\r\n [(\"Project name\",\"The Glorious Glasgow Haskell Compilation System\")\r\n ,(\"GCC extra via C opts\",\" -fwrapv -fno-builtin\")\r\n ,(\"C compiler command\",\"armv7a-unknown-linux-gnueabihf-gcc\")\r\n ,(\"C compiler flags\",\" -marm -fno-stack-protector\")\r\n ,(\"C compiler link flags\",\" -Wl,-z,noexecstack\")\r\n ,(\"C compiler supports -no-pie\",\"YES\")\r\n ,(\"Haskell CPP command\",\"armv7a-unknown-linux-gnueabihf-gcc\")\r\n ,(\"Haskell CPP flags\",\"-E -undef -traditional\")\r\n ,(\"ld command\",\"armv7a-unknown-linux-gnueabihf-ld.gold\")\r\n ,(\"ld flags\",\" -z noexecstack\")\r\n ,(\"ld supports compact unwind\",\"YES\")\r\n ,(\"ld supports build-id\",\"YES\")\r\n ,(\"ld supports filelist\",\"NO\")\r\n ,(\"ld is GNU ld\",\"YES\")\r\n ,(\"ar command\",\"armv7a-unknown-linux-gnueabihf-ar\")\r\n ,(\"ar flags\",\"q\")\r\n ,(\"ar supports at file\",\"YES\")\r\n ,(\"ranlib command\",\"armv7a-unknown-linux-gnueabihf-ranlib\")\r\n ,(\"touch command\",\"touch\")\r\n ,(\"dllwrap command\",\"armv7a-unknown-linux-gnueabihf-dllwrap\")\r\n ,(\"windres command\",\"armv7a-unknown-linux-gnueabihf-windres\")\r\n ,(\"libtool command\",\"libtool\")\r\n ,(\"perl command\",\"/usr/bin/perl\")\r\n ,(\"cross compiling\",\"YES\")\r\n ,(\"target os\",\"OSLinux\")\r\n ,(\"target arch\",\"ArchARM {armISA = ARMv7, armISAExt = [VFPv3,NEON], armABI = HARD}\")\r\n ,(\"target word size\",\"4\")\r\n ,(\"target has GNU nonexec stack\",\"True\")\r\n ,(\"target has .ident directive\",\"True\")\r\n ,(\"target has subsections via symbols\",\"False\")\r\n ,(\"target has RTS linker\",\"YES\")\r\n ,(\"Unregisterised\",\"NO\")\r\n ,(\"LLVM llc command\",\"llc\")\r\n ,(\"LLVM opt command\",\"opt\")\r\n ,(\"LLVM clang command\",\"clang\")\r\n ,(\"Project version\",\"8.7.20181014\")\r\n ,(\"Project Git commit id\",\"4a79ae580698ec635a6edd2b56958af2682511dd\")\r\n ,(\"Booter version\",\"8.4.2\")\r\n ,(\"Stage\",\"1\")\r\n ,(\"Build platform\",\"x86_64-unknown-linux\")\r\n ,(\"Host platform\",\"x86_64-unknown-linux\")\r\n ,(\"Target platform\",\"arm-unknown-linux\")\r\n ,(\"Have interpreter\",\"YES\")\r\n ,(\"Object splitting supported\",\"NO\")\r\n ,(\"Have native code generator\",\"NO\")\r\n ,(\"Support SMP\",\"YES\")\r\n ,(\"Tables next to code\",\"YES\")\r\n ,(\"RTS ways\",\"l debug thr thr_debug thr_l dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn \")\r\n ,(\"RTS expects libdw\",\"NO\")\r\n ,(\"Support dynamic-too\",\"YES\")\r\n ,(\"Support parallel --make\",\"YES\")\r\n ,(\"Support reexported-modules\",\"YES\")\r\n ,(\"Support thinning and renaming package flags\",\"YES\")\r\n ,(\"Support Backpack\",\"YES\")\r\n ,(\"Requires unified installed package IDs\",\"YES\")\r\n ,(\"Uses package keys\",\"YES\")\r\n ,(\"Uses unit IDs\",\"YES\")\r\n ,(\"Dynamic by default\",\"NO\")\r\n ,(\"GHC Dynamic\",\"NO\")\r\n ,(\"GHC Profiled\",\"NO\")\r\n ,(\"Leading underscore\",\"NO\")\r\n ,(\"Debug on\",\"False\")\r\n ,(\"LibDir\",\"/tmp/portage/cross-armv7a-unknown-linux-gnueabihf/ghc-9999/work/ghc-9999/inplace/lib\")\r\n ,(\"Global Package DB\",\"/tmp/portage/cross-armv7a-unknown-linux-gnueabihf/ghc-9999/work/ghc-9999/inplace/lib/package.conf.d\")\r\n ]\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/15743Nail down the Required/Inferred/Specified story2019-07-07T18:03:10ZSimon Peyton JonesNail down the Required/Inferred/Specified storyIn a class/data/type declaration we need to say precisely which
type variables are Inferred/Specified/Required and, for the specified
ones, which order they occur in.
See `Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility]`
i...In a class/data/type declaration we need to say precisely which
type variables are Inferred/Specified/Required and, for the specified
ones, which order they occur in.
See `Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility]`
in `TyCoRep`. Reminder:
- Required: explicitly-specified arguments to the type constructor, always
appear in any user-written type.
- Specified: variables mentioned lexically in the declaration,
but not positionally. Available for visible kind application.
- Inferred: completely invisible in the declaration; always
implicit and not available for visible kind application.
The rules for top-level (non-associated) declarations. Running
example:
```
data T (b :: (k2 :: k)) c (a :: k)
```
\* Categorisation
\* Required: the positional arguments in the header (`a`, `b`, `c`)
\* Specified: all the variables mentioned in the declaration header,
that are not Required (`k`, `k2`)
> \* Inferred: all the others (the kind of `c`)
\* Order. We need to specify the order in which the Specfied variables
are quantified. Here is the spec:
- Specified variables are always quantified before Required ones.
(We could revisit this.)
- List the specified variables in the textual order in which
they appear \[`k2`, `k`\]
- Sort them into dependency order using *ScopedSort* (see below),
giving \[`k`, `k2`\]
- Finally quantify Inferred, then Specified, then Required. In the
example we get
```
T :: forall {k1}. forall k k2. k2 -> k1 -> k -> Type
```
The *ScopedSort* algorithm works as follows
- Do dependency analysis, so for each variable we know what other
variables it depends on, transitively. By "depends on" we mean
after full kind inference, not just what is written in the
source program.
- Work left-to-right through the list, with a cursor.
- If variable `v` at the cursor is depended on by any earlier
variable `w`, move `v` immediately before the leftmost such `w`.
The invariant is that the variables to the left of the cursor
form a valid telescope.
For associated types, use this running example:
```
class C (a :: k) where
type T a (b :: k2)
```
The rules are elaborated a bit for an associated type like `T`
- Required: the explicit positional arguments (here `a`, `b`)
- Specified: any non-Required variable that is
\* mentioned (lexically) in the class header and transitively depended on by the Required
variables (here `k`), listed left-to-right; followed by
\* any other variables mentioned in the type header (here `k2`), again listed left-right.
- Inferred: all the others, as before.
The Specified variables are sorted exactly as before.
Relevant tickets
- #14887 esp #15743 (order of Inferred type variables)
- #15592
- #15591 #15743ff
(All following discussion with RAE Friday 12 Oct.)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Nail down the Required/Inferred/Specified story","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In a class/data/type declaration we need to say precisely which\r\ntype variables are Inferred/Specified/Required and, for the specified\r\nones, which order they occur in.\r\n\r\nSee `Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility]`\r\nin `TyCoRep`. Reminder:\r\n* Required: explicitly-specified arguments to the type constructor, always\r\n appear in any user-written type.\r\n\r\n* Specified: variables mentioned lexically in the declaration,\r\n but not positionally. Available for visible kind application.\r\n\r\n* Inferred: completely invisible in the declaration; always\r\n implicit and not available for visible kind application.\r\n\r\nThe rules for top-level (non-associated) declarations. Running\r\nexample:\r\n{{{\r\n data T (b :: (k2 :: k)) c (a :: k)\r\n}}}\r\n\r\n* Categorisation\r\n * Required: the positional arguments in the header (`a`, `b`, `c`)\r\n * Specified: all the variables mentioned in the declaration header,\r\n that are not Required (`k`, `k2`)\r\n * Inferred: all the others (the kind of `c`)\r\n\r\n* Order. We need to specify the order in which the Specfied variables\r\n are quantified. Here is the spec:\r\n * Specified variables are always quantified before Required ones.\r\n (We could revisit this.)\r\n * List the specified variables in the textual order in which\r\n they appear [`k2`, `k`]\r\n * Sort them into dependency order using ''ScopedSort'' (see below),\r\n giving [`k`, `k2`]\r\n * Finally quantify Inferred, then Specified, then Required. In the\r\n example we get\r\n{{{\r\nT :: forall {k1}. forall k k2. k2 -> k1 -> k -> Type\r\n}}}\r\n\r\nThe ''ScopedSort'' algorithm works as follows\r\n* Do dependency analysis, so for each variable we know what other\r\n variables it depends on, transitively. By \"depends on\" we mean\r\n after full kind inference, not just what is written in the\r\n source program.\r\n* Work left-to-right through the list, with a cursor.\r\n* If variable `v` at the cursor is depended on by any earlier\r\n variable `w`, move `v` immediately before the leftmost such `w`.\r\nThe invariant is that the variables to the left of the cursor\r\nform a valid telescope.\r\n\r\nFor associated types, use this running example:\r\n{{{\r\n class C (a :: k) where\r\n type T a (b :: k2)\r\n}}}\r\nThe rules are elaborated a bit for an associated type like `T`\r\n* Required: the explicit positional arguments (here `a`, `b`)\r\n* Specified: any non-Required variable that is \r\n * mentioned (lexically) in the class header and transitively depended on by the Required\r\n variables (here `k`), listed left-to-right; followed by \r\n * any other variables mentioned in the type header (here `k2`), again listed left-right.\r\n* Inferred: all the others, as before.\r\n\r\nThe Specified variables are sorted exactly as before.\r\n\r\n\r\nRelevant tickets\r\n* #14887 esp comment:10 (order of Inferred type variables)\r\n* #15592\r\n* #15591 comment:4ff\r\n\r\n(All following discussion with RAE Friday 12 Oct.)\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/15740Type family with higher-rank result is too accepting2019-07-07T18:03:10ZRichard Eisenbergrae@richarde.devType family with higher-rank result is too acceptingGHC accepts this garbage:
```
type family F2 :: forall k. k -> Type
data SBool :: Bool -> Type
data Nat
data SNat :: Nat -> Type
type instance F2 = SBool
type instance F2 = SNat
```
The family `F2` should have an arity of 0, meaning th...GHC accepts this garbage:
```
type family F2 :: forall k. k -> Type
data SBool :: Bool -> Type
data Nat
data SNat :: Nat -> Type
type instance F2 = SBool
type instance F2 = SNat
```
The family `F2` should have an arity of 0, meaning that only one instance is possible -- and the RHS of that instance must have kind `forall k. k -> Type`. In other words, even accepting only one of the instances above is hogwash.
This is from [ticket:11719\#comment:161416](https://gitlab.haskell.org//ghc/ghc/issues/11719#note_161416), but you don't have to read that to understand this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Type family with higher-rank result is too accepting","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":["TypeFamilies,","TypeInType"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"GHC accepts this garbage:\r\n\r\n{{{\r\ntype family F2 :: forall k. k -> Type\r\ndata SBool :: Bool -> Type\r\ndata Nat\r\ndata SNat :: Nat -> Type\r\ntype instance F2 = SBool\r\ntype instance F2 = SNat\r\n}}}\r\n\r\nThe family `F2` should have an arity of 0, meaning that only one instance is possible -- and the RHS of that instance must have kind `forall k. k -> Type`. In other words, even accepting only one of the instances above is hogwash.\r\n\r\nThis is from comment:15:ticket:11719, but you don't have to read that to understand this.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/15738-ddump-splices omits required parentheses around quantified constraints2019-07-07T18:03:11ZRyan Scott-ddump-splices omits required parentheses around quantified constraintsIf you compile this program with `-ddump-splices`:
```hs
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -ddump-splices #-}
module Bug where
import Language.Haskell.TH
data Foo x = MkFoo x
$([d...If you compile this program with `-ddump-splices`:
```hs
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -ddump-splices #-}
module Bug where
import Language.Haskell.TH
data Foo x = MkFoo x
$([d| f :: (forall a. Eq (Foo a)) => Foo x -> Foo x -> Bool
f = (==)
|])
```
You'll notice something fishy:
```
$ /opt/ghc/8.6.1/bin/ghci Bug.hs
GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Bug ( Bug.hs, interpreted )
Bug.hs:(10,3)-(12,6): Splicing declarations
[d| f_a1Ia ::
(forall a_a1Ic. Eq (Foo a_a1Ic)) =>
Foo x_a1Ib -> Foo x_a1Ib -> Bool
f_a1Ia = (==) |]
======>
f_a5tj ::
forall a_a5tk. Eq (Foo a_a5tk) => Foo x_a5ti -> Foo x_a5ti -> Bool
f_a5tj = (==)
Ok, one module loaded.
```
The signature for `f` gets pretty-printed as:
```hs
f_a5tj :: forall a_a5tk. Eq (Foo a_a5tk) => Foo x_a5ti -> Foo x_a5ti -> Bool
```
Which is just plain wrong—there is a missing set of parentheses around the quantified constraint `forall a_a5tk. Eq (Foo a_a5tk)`.
Patch incoming.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 8.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Template Haskell |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"-ddump-splices omits required parentheses around quantified constraints","status":"New","operating_system":"","component":"Template Haskell","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"If you compile this program with `-ddump-splices`:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE QuantifiedConstraints #-}\r\n{-# LANGUAGE TemplateHaskell #-}\r\n{-# OPTIONS_GHC -ddump-splices #-}\r\nmodule Bug where\r\n\r\nimport Language.Haskell.TH\r\n\r\ndata Foo x = MkFoo x\r\n\r\n$([d| f :: (forall a. Eq (Foo a)) => Foo x -> Foo x -> Bool\r\n f = (==)\r\n |])\r\n}}}\r\n\r\nYou'll notice something fishy:\r\n\r\n{{{\r\n$ /opt/ghc/8.6.1/bin/ghci Bug.hs\r\nGHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help\r\nLoaded GHCi configuration from /home/rgscott/.ghci\r\n[1 of 1] Compiling Bug ( Bug.hs, interpreted )\r\nBug.hs:(10,3)-(12,6): Splicing declarations\r\n [d| f_a1Ia ::\r\n (forall a_a1Ic. Eq (Foo a_a1Ic)) =>\r\n Foo x_a1Ib -> Foo x_a1Ib -> Bool\r\n f_a1Ia = (==) |]\r\n ======>\r\n f_a5tj ::\r\n forall a_a5tk. Eq (Foo a_a5tk) => Foo x_a5ti -> Foo x_a5ti -> Bool\r\n f_a5tj = (==)\r\nOk, one module loaded.\r\n}}}\r\n\r\nThe signature for `f` gets pretty-printed as:\r\n\r\n{{{#!hs\r\nf_a5tj :: forall a_a5tk. Eq (Foo a_a5tk) => Foo x_a5ti -> Foo x_a5ti -> Bool\r\n}}}\r\n\r\nWhich is just plain wrong—there is a missing set of parentheses around the quantified constraint `forall a_a5tk. Eq (Foo a_a5tk)`.\r\n\r\nPatch incoming.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/15736Testsuite failures from validate --slow2020-05-31T16:39:47Zjrp2014Testsuite failures from validate --slowIn case it helps, I ran a `./validate --slow` on HEAD on Ubuntu Bionic with 8.6.1. I don't attach much weight to the performance / stat failures as the tests seem to run in parallel. I'll pull out more specific diagnostics, if necessary....In case it helps, I ran a `./validate --slow` on HEAD on Ubuntu Bionic with 8.6.1. I don't attach much weight to the performance / stat failures as the tests seem to run in parallel. I'll pull out more specific diagnostics, if necessary.
```
==== STAGE 1 TESTS ====
SUMMARY for test run started at Wed Oct 10 20:29:33 2018 BST
0:00:04 spent to go through
2 total tests, which gave rise to
10 test cases, of which
0 were skipped
0 had missing libraries
10 expected passes
0 expected failures
0 caused framework failures
0 caused framework warnings
0 unexpected passes
0 unexpected failures
0 unexpected stat failures
==== STAGE 2 TESTS ====
Unexpected results from:
TEST="EtaExpandLevPoly T14936 T15349 T2783 T4334 T7919 haddock.Cabal haddock.base haddock.compiler hpc_fork plugin-recomp-change plugin-recomp-change-prof recomp007 space_leak_001"
SUMMARY for test run started at Wed Oct 10 19:31:20 2018 BST
0:58:10 spent to go through
6596 total tests, which gave rise to
29689 test cases, of which
5881 were skipped
256 had missing libraries
23273 expected passes
257 expected failures
0 caused framework failures
0 caused framework warnings
3 unexpected passes
6 unexpected failures
13 unexpected stat failures
Unexpected passes:
/tmp/ghctest-kyex1v3_/test spaces/rts/T2783.run T2783 [unexpected] (threaded1)
/tmp/ghctest-kyex1v3_/test spaces/typecheck/should_run/EtaExpandLevPoly.run EtaExpandLevPoly [unexpected] (profasm)
/tmp/ghctest-kyex1v3_/test spaces/typecheck/should_run/EtaExpandLevPoly.run EtaExpandLevPoly [unexpected] (profthreaded)
Unexpected failures:
/tmp/ghctest-kyex1v3_/test spaces/driver/recomp007/recomp007.run recomp007 [bad stderr] (normal)
/tmp/ghctest-kyex1v3_/test spaces/plugins/plugin-recomp-change.run plugin-recomp-change [bad stderr] (normal)
/tmp/ghctest-kyex1v3_/test spaces/plugins/plugin-recomp-change-prof.run plugin-recomp-change-prof [bad stderr] (normal)
/tmp/ghctest-kyex1v3_/test spaces/rts/T7919.run T7919 [bad exit code] (ghci)
/tmp/ghctest-kyex1v3_/test spaces/libraries/hpc/tests/fork/hpc_fork.run hpc_fork [bad heap profile] (profasm)
/tmp/ghctest-kyex1v3_/test spaces/libraries/base/tests/T15349.run T15349 [bad exit code] (ghci)
Unexpected stat failures:
/tmp/ghctest-kyex1v3_/test spaces/perf/haddock/haddock.base.run haddock.base [stat not good enough] (normal)
/tmp/ghctest-kyex1v3_/test spaces/perf/haddock/haddock.Cabal.run haddock.Cabal [stat not good enough] (normal)
/tmp/ghctest-kyex1v3_/test spaces/perf/haddock/haddock.compiler.run haddock.compiler [stat not good enough] (normal)
/tmp/ghctest-kyex1v3_/test spaces/perf/should_run/T14936.run T14936 [stat not good enough] (hpc)
/tmp/ghctest-kyex1v3_/test spaces/perf/should_run/T14936.run T14936 [stat not good enough] (profasm)
/tmp/ghctest-kyex1v3_/test spaces/perf/space_leaks/space_leak_001.run space_leak_001 [stat too good] (hpc)
/tmp/ghctest-kyex1v3_/test spaces/perf/space_leaks/space_leak_001.run space_leak_001 [stat too good] (optasm)
/tmp/ghctest-kyex1v3_/test spaces/perf/space_leaks/T4334.run T4334 [stat not good enough] (threaded2)
/tmp/ghctest-kyex1v3_/test spaces/perf/space_leaks/space_leak_001.run space_leak_001 [stat too good] (dyn)
/tmp/ghctest-kyex1v3_/test spaces/perf/space_leaks/space_leak_001.run space_leak_001 [stat too good] (optllvm)
/tmp/ghctest-kyex1v3_/test spaces/perf/should_run/T14936.run T14936 [stat not good enough] (threaded1)
/tmp/ghctest-kyex1v3_/test spaces/perf/should_run/T14936.run T14936 [stat not good enough] (threaded2)
/tmp/ghctest-kyex1v3_/test spaces/perf/should_run/T14936.run T14936 [stat not good enough] (profthreaded)
== Start post-testsuite package check
GHC package manager version 8.7.20181010
Timestamp 2018-10-10 18:31:15.21573855 UTC for /home/jrp/Projects/ghc/bindisttest/install dir/lib/ghc-8.7.20181010/package.conf.d/package.cache
using cache: /home/jrp/Projects/ghc/bindisttest/install dir/lib/ghc-8.7.20181010/package.conf.d/package.cache
db stack: ["/home/jrp/.ghc/x86_64-linux-8.7.20181010/package.conf.d","/home/jrp/Projects/ghc/bindisttest/install dir/lib/ghc-8.7.20181010/package.conf.d"]
flag db stack: ["/home/jrp/.ghc/x86_64-linux-8.7.20181010/package.conf.d","/home/jrp/Projects/ghc/bindisttest/install dir/lib/ghc-8.7.20181010/package.conf.d"]
== End post-testsuite package check
-------------------------------------------------------------------
Oops! Looks like you have some unexpected test results or framework failures.
Please fix them before pushing/sending patches.
-------------------------------------------------------------------
```https://gitlab.haskell.org/ghc/ghc/-/issues/15734ghc-heap package is not on hackage2023-04-01T11:51:50ZMatthew Pickeringghc-heap package is not on hackageThe documentation for ghc-heap is quite hidden away here:
https://downloads.haskell.org/\~ghc/latest/docs/html/libraries/ghc-heap-8.6.1/GHC-Exts-Heap.html
It would be useful if it was on hackage so that it had better discoverability an...The documentation for ghc-heap is quite hidden away here:
https://downloads.haskell.org/\~ghc/latest/docs/html/libraries/ghc-heap-8.6.1/GHC-Exts-Heap.html
It would be useful if it was on hackage so that it had better discoverability and was easier to browse the documentation like the normal `ghc` package.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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-heap package is not on hackage","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The documentation for ghc-heap is quite hidden away here:\r\n\r\nhttps://downloads.haskell.org/~ghc/latest/docs/html/libraries/ghc-heap-8.6.1/GHC-Exts-Heap.html\r\n\r\nIt would be useful if it was on hackage so that it had better discoverability and was easier to browse the documentation like the normal `ghc` package. ","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/15733Several links in GHC.Exts.Heap documentation are broken2019-07-07T18:03:12ZMatthew PickeringSeveral links in GHC.Exts.Heap documentation are brokenThere are some broken links in the GHC.Exts.Heap documentation.
https://downloads.haskell.org/\~ghc/latest/docs/html/libraries/ghc-heap-8.6.1/GHC-Exts-Heap.html
For example, in `GenClosure`, the first link is wrong and redirects.
http...There are some broken links in the GHC.Exts.Heap documentation.
https://downloads.haskell.org/\~ghc/latest/docs/html/libraries/ghc-heap-8.6.1/GHC-Exts-Heap.html
For example, in `GenClosure`, the first link is wrong and redirects.
http://hackage.haskell.org/trac/ghc/browser/includes/rts/storage/Closures.h
Similarly in the definition of `StgInfoTable`. Those are the two I found.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Several links in GHC.Exts.Heap documentation are broken","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":["newcomer"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"There are some broken links in the GHC.Exts.Heap documentation.\r\n\r\nhttps://downloads.haskell.org/~ghc/latest/docs/html/libraries/ghc-heap-8.6.1/GHC-Exts-Heap.html\r\n\r\nFor example, in `GenClosure`, the first link is wrong and redirects.\r\n\r\nhttp://hackage.haskell.org/trac/ghc/browser/includes/rts/storage/Closures.h\r\n\r\nSimilarly in the definition of `StgInfoTable`. Those are the two I found.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/15730SCC/HPC/CORE annotation can change the meaning of an expression2020-01-02T20:44:54ZVladislav ZavialovSCC/HPC/CORE annotation can change the meaning of an expressionConsider this GHCi session:
```
Prelude> 1 / 2 / 2
0.25
Prelude> 1 / {-# SCC ann #-} 2 / 2
1.0
```
Adding an SCC annotation changed the meaning of the expression.
<details><summary>Trac metadata</summary>
| Trac field | V...Consider this GHCi session:
```
Prelude> 1 / 2 / 2
0.25
Prelude> 1 / {-# SCC ann #-} 2 / 2
1.0
```
Adding an SCC annotation changed the meaning of the expression.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 8.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"SCC/HPC/CORE annotation can change the meaning of an expression","status":"New","operating_system":"","component":"Compiler (Parser)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Consider this GHCi session:\r\n\r\n{{{\r\nPrelude> 1 / 2 / 2\r\n0.25\r\nPrelude> 1 / {-# SCC ann #-} 2 / 2\r\n1.0\r\n}}}\r\n\r\nAdding an SCC annotation changed the meaning of the expression.","type_of_failure":"OtherFailure","blocking":[]} -->Vladislav ZavialovVladislav Zavialovhttps://gitlab.haskell.org/ghc/ghc/-/issues/15729Static GHCi can segfault when accessing .bss section in C2019-07-07T18:03:13ZZejun WuStatic GHCi can segfault when accessing .bss section in CWhen an object file is statically linked, GHCi can return junk or segfault when trying to access data defined in .bss section via foreign call.
```
watashi % ~/gao/ghc/inplace/bin/ghc-stage2 --info | grep Dynamic
,("Dynamic by default"...When an object file is statically linked, GHCi can return junk or segfault when trying to access data defined in .bss section via foreign call.
```
watashi % ~/gao/ghc/inplace/bin/ghc-stage2 --info | grep Dynamic
,("Dynamic by default","NO")
,("GHC Dynamic","NO")
watashi % cat bss.c
int read_bss(int i) {
static int bss[1 << 20];
return bss[i];
}
watashi % ~/gao/ghc/inplace/bin/ghc-stage2 --interactive test.o
GHCi, version 8.7.20180920: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/watashi/.ghci
Prelude> :m + Foreign Foreign.C
Prelude Foreign Foreign.C> foreign import ccall unsafe "read_bss" read_bss :: Int -> IO Int
Prelude Foreign Foreign.C> read_bss 0
4294059519
Prelude Foreign Foreign.C> read_bss 1
65535
Prelude Foreign Foreign.C> mapM (read_bss . bit) [0 .. 19]
zsh: segmentation fault (core dumped) ~/gao/ghc/inplace/bin/ghc-stage2 --interactive test.o
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 8.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | simonmar, watashi |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Static GHCi can segfault when accessing .bss section in C","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["simonmar","watashi"],"type":"Bug","description":"When an object file is statically linked, GHCi can return junk or segfault when trying to access data defined in .bss section via foreign call.\r\n\r\n{{{\r\nwatashi % ~/gao/ghc/inplace/bin/ghc-stage2 --info | grep Dynamic\r\n ,(\"Dynamic by default\",\"NO\")\r\n ,(\"GHC Dynamic\",\"NO\")\r\nwatashi % cat bss.c\r\nint read_bss(int i) {\r\n static int bss[1 << 20];\r\n return bss[i];\r\n}\r\nwatashi % ~/gao/ghc/inplace/bin/ghc-stage2 --interactive test.o\r\nGHCi, version 8.7.20180920: http://www.haskell.org/ghc/ :? for help\r\nLoaded GHCi configuration from /home/watashi/.ghci\r\nPrelude> :m + Foreign Foreign.C\r\nPrelude Foreign Foreign.C> foreign import ccall unsafe \"read_bss\" read_bss :: Int -> IO Int\r\nPrelude Foreign Foreign.C> read_bss 0\r\n4294059519\r\nPrelude Foreign Foreign.C> read_bss 1\r\n65535\r\nPrelude Foreign Foreign.C> mapM (read_bss . bit) [0 .. 19]\r\nzsh: segmentation fault (core dumped) ~/gao/ghc/inplace/bin/ghc-stage2 --interactive test.o\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Zejun WuZejun Wuhttps://gitlab.haskell.org/ghc/ghc/-/issues/15728Program with safe array operations triggers debug runtime assertion2019-07-07T18:03:13ZÖmer Sinan AğacanProgram with safe array operations triggers debug runtime assertionI'll try to minimize later.
Main.hs:
```
{-# LANGUAGE ForeignFunctionInterface #-}
import Control.Monad
import Control.Monad.ST
import Data.Primitive.Array
import Data.Primitive.ByteArray
import Data.Primitive.SmallArray
import System....I'll try to minimize later.
Main.hs:
```
{-# LANGUAGE ForeignFunctionInterface #-}
import Control.Monad
import Control.Monad.ST
import Data.Primitive.Array
import Data.Primitive.ByteArray
import Data.Primitive.SmallArray
import System.Environment
import System.Mem
import Foreign.C
data A arr = A !Int arr
enumSmallArray :: Int -> A (SmallArray Int)
enumSmallArray n = runST $ do
arr <- newSmallArray n 0
forM_ [1..n] $ \i ->
writeSmallArray arr i i
iarr <- freezeSmallArray arr 0 n
return (A n iarr)
consumeSmallArray :: A (SmallArray a) -> a
consumeSmallArray (A n arr) = indexSmallArray arr (n - 1)
enumArray :: Int -> A (Array Int)
enumArray n = runST $ do
arr <- newArray n 0
forM_ [1..n] $ \i ->
writeArray arr i i
iarr <- freezeArray arr 0 n
return (A n iarr)
consumeArray :: A (Array a) -> a
consumeArray (A n arr) = indexArray arr (n - 1)
foreign import ccall "printInt"
printInt :: CInt -> IO ()
main :: IO ()
main = do
n <- (\[s] -> read s) <$> getArgs
ints <- forM [1..n] $ \i -> do
let x = consumeSmallArray (enumSmallArray 12)
y = consumeArray (enumArray i)
case x+y of
r -> when (i `mod` 5000 == 0) performMajorGC
>> return r
printInt (fromIntegral (sum ints))
```
print.c:
```
#include <stdio.h>
void printInt(int i) { printf("Result: %d\n", i); }
```
Compile:
```
$ ghc Main.hs print.c -debug
Linking Main ...
```
Run:
```
array_bug $ ./Main 1000 +RTS -DS
Main: internal error: ASSERTION FAILED: file rts/sm/Storage.c, line 960
(GHC version 8.6.1 for x86_64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
zsh: abort (core dumped) ./Main 1000 +RTS -DS
```
Tried with: 8.4.3, 8.6.1.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | bgamari |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Program with safe array operations triggers debug runtime assertion","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["bgamari"],"type":"Bug","description":"I'll try to minimize later.\r\n\r\nMain.hs:\r\n\r\n{{{\r\n{-# LANGUAGE ForeignFunctionInterface #-}\r\nimport Control.Monad\r\nimport Control.Monad.ST\r\nimport Data.Primitive.Array\r\nimport Data.Primitive.ByteArray\r\nimport Data.Primitive.SmallArray\r\nimport System.Environment\r\nimport System.Mem\r\nimport Foreign.C\r\n\r\ndata A arr = A !Int arr\r\n\r\nenumSmallArray :: Int -> A (SmallArray Int)\r\nenumSmallArray n = runST $ do\r\n arr <- newSmallArray n 0\r\n forM_ [1..n] $ \\i ->\r\n writeSmallArray arr i i\r\n iarr <- freezeSmallArray arr 0 n\r\n return (A n iarr)\r\n\r\nconsumeSmallArray :: A (SmallArray a) -> a\r\nconsumeSmallArray (A n arr) = indexSmallArray arr (n - 1)\r\n\r\nenumArray :: Int -> A (Array Int)\r\nenumArray n = runST $ do\r\n arr <- newArray n 0\r\n forM_ [1..n] $ \\i ->\r\n writeArray arr i i\r\n iarr <- freezeArray arr 0 n\r\n return (A n iarr)\r\n\r\nconsumeArray :: A (Array a) -> a\r\nconsumeArray (A n arr) = indexArray arr (n - 1)\r\n\r\nforeign import ccall \"printInt\"\r\n printInt :: CInt -> IO ()\r\n\r\nmain :: IO ()\r\nmain = do\r\n n <- (\\[s] -> read s) <$> getArgs\r\n ints <- forM [1..n] $ \\i -> do\r\n let x = consumeSmallArray (enumSmallArray 12)\r\n y = consumeArray (enumArray i)\r\n case x+y of\r\n r -> when (i `mod` 5000 == 0) performMajorGC\r\n >> return r\r\n printInt (fromIntegral (sum ints))\r\n}}}\r\n\r\nprint.c:\r\n\r\n{{{\r\n#include <stdio.h>\r\n\r\nvoid printInt(int i) { printf(\"Result: %d\\n\", i); }\r\n}}}\r\n\r\nCompile:\r\n\r\n{{{\r\n$ ghc Main.hs print.c -debug\r\nLinking Main ...\r\n}}}\r\n\r\nRun:\r\n\r\n{{{\r\narray_bug $ ./Main 1000 +RTS -DS\r\nMain: internal error: ASSERTION FAILED: file rts/sm/Storage.c, line 960\r\n\r\n (GHC version 8.6.1 for x86_64_unknown_linux)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\nzsh: abort (core dumped) ./Main 1000 +RTS -DS\r\n}}}\r\n\r\nTried with: 8.4.3, 8.6.1.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/15725Core Lint error: Trans coercion mis-match2019-07-07T18:03:14ZRyan ScottCore Lint error: Trans coercion mis-matchI discovered this when debugging #15703. The following code fails to compile with `-dcore-lint`:
```hs
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ...I discovered this when debugging #15703. The following code fails to compile with `-dcore-lint`:
```hs
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Bug where
import Data.Functor.Identity (Identity(..))
import Data.Kind (Type)
import GHC.Exts (Any)
-----
-- The important bits
-----
type instance Meth (x :: Identity a) = GenericMeth x
instance SC Identity
-------------------------------------------------------------------------------
data family Sing :: forall k. k -> Type
data instance Sing :: forall a. Identity a -> Type where
SIdentity :: Sing x -> Sing ('Identity x)
newtype Par1 p = Par1 p
data instance Sing :: forall p. Par1 p -> Type where
SPar1 :: Sing x -> Sing ('Par1 x)
type family Rep1 (f :: Type -> Type) :: Type -> Type
class PGeneric1 (f :: Type -> Type) where
type From1 (z :: f a) :: Rep1 f a
type To1 (z :: Rep1 f a) :: f a
class SGeneric1 (f :: Type -> Type) where
sFrom1 :: forall (a :: Type) (z :: f a). Sing z -> Sing (From1 z)
sTo1 :: forall (a :: Type) (r :: Rep1 f a). Sing r -> Sing (To1 r :: f a)
type instance Rep1 Identity = Par1
instance PGeneric1 Identity where
type From1 ('Identity x) = 'Par1 x
type To1 ('Par1 x) = 'Identity x
instance SGeneric1 Identity where
sFrom1 (SIdentity x) = SPar1 x
sTo1 (SPar1 x) = SIdentity x
type family GenericMeth (x :: f a) :: f a where
GenericMeth x = To1 (Meth (From1 x))
type family Meth (x :: f a) :: f a
class SC f where
sMeth :: forall a (x :: f a).
Sing x -> Sing (Meth x)
default sMeth :: forall a (x :: f a).
( SGeneric1 f, SC (Rep1 f)
, Meth x ~ GenericMeth x
)
=> Sing x -> Sing (Meth x)
sMeth sx = sTo1 (sMeth (sFrom1 sx))
dummy :: f a -> ()
dummy _ = ()
type instance Meth (x :: Par1 p) = x
instance SC Par1 where
sMeth x = x
```
```
$ /opt/ghc/8.6.1/bin/ghc -fforce-recomp Bug.hs -dcore-lint
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
*** Core Lint errors : in result of Simplifier ***
<no location info>: warning:
[in body of letrec with binders x_s1Nw :: Sing (From1 x_a1Jc)]
Trans coercion mis-match: D:R:Rep1Identity[0] <a_a1Jb>_N ; Sym (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)
Rep1 Identity a_a1Jb
Par1 a_a1Jb
Rep1 Identity a_a1Jb
Par1 a_a1Jb
*** Offending Program ***
<elided>
$csMeth_a1J9 [Occ=LoopBreaker]
:: forall a (x :: Identity a). Sing x -> Sing (Meth x)
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 100 60}]
$csMeth_a1J9
= \ (@ a_a1Jb) (@ (x_a1Jc :: Identity a_a1Jb)) ->
case heq_sel
@ (Identity a_a1Jb)
@ (Identity a_a1Jb)
@ (Meth x_a1Jc)
@ (GenericMeth x_a1Jc)
(($d~_s1Nz @ a_a1Jb @ x_a1Jc)
`cast` (((~)
<Identity a_a1Jb>_N
((To1
<Identity>_N
<a_a1Jb>_N
(Coh (Sym (D:R:MethTYPEPar1px[0]
<a_a1Jb>_N
(Coh (Sym (Coh <From1 x_a1Jc>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N)))
(D:R:Rep1Identity[0] <a_a1Jb>_N))))
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N) ; (Meth
<*>_N
(Sym (D:R:Rep1Identity[0]))
<a_a1Jb>_N
(Coh <From1 x_a1Jc>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N)))_N))_N ; (Sym (D:R:GenericMeth[0]
<Identity>_N
<a_a1Jb>_N
<x_a1Jc>_N) ; Sym (D:R:MethTYPEIdentityax[0]
<a_a1Jb>_N
<x_a1Jc>_N)))
((To1
<Identity>_N
<a_a1Jb>_N
(Coh (Sym (Coh (Sym (Coh <From1 x_a1Jc>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N)))
(D:R:Rep1Identity[0] <a_a1Jb>_N)))
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N) ; (Sym (D:R:MethTYPEPar1px[0]
<a_a1Jb>_N
(Coh (Sym (Coh <From1
x_a1Jc>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N)))
(D:R:Rep1Identity[0] <a_a1Jb>_N))) ; (Meth
<*>_N
(Sym (D:R:Rep1Identity[0]))
<a_a1Jb>_N
(Coh <From1
x_a1Jc>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N)))_N)))_N ; Sym (D:R:GenericMeth[0]
<Identity>_N
<a_a1Jb>_N
<x_a1Jc>_N)))_R ; N:~[0]
<Identity
a_a1Jb>_N <Meth
x_a1Jc>_N <GenericMeth
x_a1Jc>_N
:: (To1 (From1 x_a1Jc) ~ To1 (From1 x_a1Jc))
~R# (Meth x_a1Jc ~~ GenericMeth x_a1Jc)))
of co_a1Kd
{ __DEFAULT ->
(\ (sx_aEZ :: Sing x_a1Jc) ->
let {
x_s1Nw :: Sing (From1 x_a1Jc)
[LclId]
x_s1Nw = $csFrom1_a1Jz @ a_a1Jb @ x_a1Jc sx_aEZ } in
case x_s1Nw
`cast` ((Sing
(D:R:Rep1Identity[0] <a_a1Jb>_N)
(Coh (Sym (Coh <From1 x_a1Jc>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N ; Sym (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N))))
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)))_R ; (Nth:3
(Inst (forall (x :: Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N).
(Sing
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)
(Sym (Coh <x>_N
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N))))_R
->_R (Sing
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)
(Sym (D:R:MethTYPEPar1px[0]
<a_a1Jb>_N
<x>_N) ; (Meth
<*>_N
(Sym (D:R:Rep1Identity[0]))
<a_a1Jb>_N
(Sym (Coh <x>_N
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N))))_N))_R) (Coh <From1
x_a1Jc>_N
(Sym (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)))) ; ((Sing
(D:R:Rep1Identity[0] <a_a1Jb>_N))_R ; D:R:SingPar10[0]
<a_a1Jb>_N) (Sym (Coh <Meth
(From1
x_a1Jc)>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N))))
:: Sing (From1 x_a1Jc |> Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)
~R# R:SingPar1
a_a1Jb (Meth (From1 x_a1Jc) |> D:R:Rep1Identity[0] <a_a1Jb>_N))
of
{ SPar1 @ x_a1JZ co_a1K0 x_a195 ->
($WSIdentity @ a_a1Jb @ x_a1JZ x_a195)
`cast` ((Sing
<Identity a_a1Jb>_N
(Sym (D:R:To1IdentityaPar1[0] <a_a1Jb>_N <x_a1JZ>_N) ; (To1
<Identity>_N
<a_a1Jb>_N
(Sym (Coh (Sym (Coh <'Par1
x_a1JZ>_N
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)))
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)) ; (Coh <'Par1
x_a1JZ>_N
(Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N) ; (Sym co_a1K0 ; Coh <Meth
(From1
x_a1Jc)>_N
(D:R:Rep1Identity[0] <a_a1Jb>_N)))))_N))_R
:: Sing ('Identity x_a1JZ) ~R# Sing (To1 (Meth (From1 x_a1Jc))))
})
`cast` (<Sing x_a1Jc>_R
->_R (Sing
<Identity a_a1Jb>_N
(Sym (D:R:GenericMeth[0]
<Identity>_N <a_a1Jb>_N <x_a1Jc>_N) ; Sym co_a1Kd))_R
:: (Sing x_a1Jc -> Sing (To1 (Meth (From1 x_a1Jc))))
~R# (Sing x_a1Jc -> Sing (Meth x_a1Jc)))
}
end Rec }
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Core Lint error: Trans coercion mis-match","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I discovered this when debugging #15703. The following code fails to compile with `-dcore-lint`:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE DefaultSignatures #-}\r\n{-# LANGUAGE FlexibleContexts #-}\r\n{-# LANGUAGE GADTs #-}\r\n{-# LANGUAGE RankNTypes #-}\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\n{-# LANGUAGE TypeApplications #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\n{-# LANGUAGE TypeInType #-}\r\n{-# LANGUAGE TypeOperators #-}\r\n{-# LANGUAGE UndecidableInstances #-}\r\nmodule Bug where\r\n\r\nimport Data.Functor.Identity (Identity(..))\r\nimport Data.Kind (Type)\r\nimport GHC.Exts (Any)\r\n\r\n-----\r\n-- The important bits\r\n-----\r\n\r\ntype instance Meth (x :: Identity a) = GenericMeth x\r\ninstance SC Identity\r\n\r\n-------------------------------------------------------------------------------\r\n\r\ndata family Sing :: forall k. k -> Type\r\ndata instance Sing :: forall a. Identity a -> Type where\r\n SIdentity :: Sing x -> Sing ('Identity x)\r\n\r\nnewtype Par1 p = Par1 p\r\ndata instance Sing :: forall p. Par1 p -> Type where\r\n SPar1 :: Sing x -> Sing ('Par1 x)\r\n\r\ntype family Rep1 (f :: Type -> Type) :: Type -> Type\r\n\r\nclass PGeneric1 (f :: Type -> Type) where\r\n type From1 (z :: f a) :: Rep1 f a\r\n type To1 (z :: Rep1 f a) :: f a\r\n\r\nclass SGeneric1 (f :: Type -> Type) where\r\n sFrom1 :: forall (a :: Type) (z :: f a). Sing z -> Sing (From1 z)\r\n sTo1 :: forall (a :: Type) (r :: Rep1 f a). Sing r -> Sing (To1 r :: f a)\r\n\r\ntype instance Rep1 Identity = Par1\r\n\r\ninstance PGeneric1 Identity where\r\n type From1 ('Identity x) = 'Par1 x\r\n type To1 ('Par1 x) = 'Identity x\r\n\r\ninstance SGeneric1 Identity where\r\n sFrom1 (SIdentity x) = SPar1 x\r\n sTo1 (SPar1 x) = SIdentity x\r\n\r\ntype family GenericMeth (x :: f a) :: f a where\r\n GenericMeth x = To1 (Meth (From1 x))\r\n\r\ntype family Meth (x :: f a) :: f a\r\n\r\nclass SC f where\r\n sMeth :: forall a (x :: f a).\r\n Sing x -> Sing (Meth x)\r\n default sMeth :: forall a (x :: f a).\r\n ( SGeneric1 f, SC (Rep1 f)\r\n , Meth x ~ GenericMeth x\r\n )\r\n => Sing x -> Sing (Meth x)\r\n sMeth sx = sTo1 (sMeth (sFrom1 sx))\r\n\r\n dummy :: f a -> ()\r\n dummy _ = ()\r\n\r\ntype instance Meth (x :: Par1 p) = x\r\ninstance SC Par1 where\r\n sMeth x = x\r\n}}}\r\n{{{\r\n$ /opt/ghc/8.6.1/bin/ghc -fforce-recomp Bug.hs -dcore-lint\r\n[1 of 1] Compiling Bug ( Bug.hs, Bug.o )\r\n*** Core Lint errors : in result of Simplifier ***\r\n<no location info>: warning:\r\n [in body of letrec with binders x_s1Nw :: Sing (From1 x_a1Jc)]\r\n Trans coercion mis-match: D:R:Rep1Identity[0] <a_a1Jb>_N ; Sym (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)\r\n Rep1 Identity a_a1Jb\r\n Par1 a_a1Jb\r\n Rep1 Identity a_a1Jb\r\n Par1 a_a1Jb\r\n*** Offending Program ***\r\n\r\n<elided>\r\n\r\n$csMeth_a1J9 [Occ=LoopBreaker]\r\n :: forall a (x :: Identity a). Sing x -> Sing (Meth x)\r\n[LclId,\r\n Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,\r\n WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 100 60}]\r\n$csMeth_a1J9\r\n = \\ (@ a_a1Jb) (@ (x_a1Jc :: Identity a_a1Jb)) ->\r\n case heq_sel\r\n @ (Identity a_a1Jb)\r\n @ (Identity a_a1Jb)\r\n @ (Meth x_a1Jc)\r\n @ (GenericMeth x_a1Jc)\r\n (($d~_s1Nz @ a_a1Jb @ x_a1Jc)\r\n `cast` (((~)\r\n <Identity a_a1Jb>_N\r\n ((To1\r\n <Identity>_N\r\n <a_a1Jb>_N\r\n (Coh (Sym (D:R:MethTYPEPar1px[0]\r\n <a_a1Jb>_N\r\n (Coh (Sym (Coh <From1 x_a1Jc>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)))\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N))))\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N) ; (Meth\r\n <*>_N\r\n (Sym (D:R:Rep1Identity[0]))\r\n <a_a1Jb>_N\r\n (Coh <From1 x_a1Jc>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)))_N))_N ; (Sym (D:R:GenericMeth[0]\r\n <Identity>_N\r\n <a_a1Jb>_N\r\n <x_a1Jc>_N) ; Sym (D:R:MethTYPEIdentityax[0]\r\n <a_a1Jb>_N\r\n <x_a1Jc>_N)))\r\n ((To1\r\n <Identity>_N\r\n <a_a1Jb>_N\r\n (Coh (Sym (Coh (Sym (Coh <From1 x_a1Jc>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)))\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)))\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N) ; (Sym (D:R:MethTYPEPar1px[0]\r\n <a_a1Jb>_N\r\n (Coh (Sym (Coh <From1\r\n x_a1Jc>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)))\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N))) ; (Meth\r\n <*>_N\r\n (Sym (D:R:Rep1Identity[0]))\r\n <a_a1Jb>_N\r\n (Coh <From1\r\n x_a1Jc>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)))_N)))_N ; Sym (D:R:GenericMeth[0]\r\n <Identity>_N\r\n <a_a1Jb>_N\r\n <x_a1Jc>_N)))_R ; N:~[0]\r\n <Identity\r\n a_a1Jb>_N <Meth\r\n x_a1Jc>_N <GenericMeth\r\n x_a1Jc>_N\r\n :: (To1 (From1 x_a1Jc) ~ To1 (From1 x_a1Jc))\r\n ~R# (Meth x_a1Jc ~~ GenericMeth x_a1Jc)))\r\n of co_a1Kd\r\n { __DEFAULT ->\r\n (\\ (sx_aEZ :: Sing x_a1Jc) ->\r\n let {\r\n x_s1Nw :: Sing (From1 x_a1Jc)\r\n [LclId]\r\n x_s1Nw = $csFrom1_a1Jz @ a_a1Jb @ x_a1Jc sx_aEZ } in\r\n case x_s1Nw\r\n `cast` ((Sing\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)\r\n (Coh (Sym (Coh <From1 x_a1Jc>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N ; Sym (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N))))\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)))_R ; (Nth:3\r\n (Inst (forall (x :: Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N).\r\n (Sing\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)\r\n (Sym (Coh <x>_N\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N))))_R\r\n ->_R (Sing\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)\r\n (Sym (D:R:MethTYPEPar1px[0]\r\n <a_a1Jb>_N\r\n <x>_N) ; (Meth\r\n <*>_N\r\n (Sym (D:R:Rep1Identity[0]))\r\n <a_a1Jb>_N\r\n (Sym (Coh <x>_N\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N))))_N))_R) (Coh <From1\r\n x_a1Jc>_N\r\n (Sym (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)))) ; ((Sing\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N))_R ; D:R:SingPar10[0]\r\n <a_a1Jb>_N) (Sym (Coh <Meth\r\n (From1\r\n x_a1Jc)>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N))))\r\n :: Sing (From1 x_a1Jc |> Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)\r\n ~R# R:SingPar1\r\n a_a1Jb (Meth (From1 x_a1Jc) |> D:R:Rep1Identity[0] <a_a1Jb>_N))\r\n of\r\n { SPar1 @ x_a1JZ co_a1K0 x_a195 ->\r\n ($WSIdentity @ a_a1Jb @ x_a1JZ x_a195)\r\n `cast` ((Sing\r\n <Identity a_a1Jb>_N\r\n (Sym (D:R:To1IdentityaPar1[0] <a_a1Jb>_N <x_a1JZ>_N) ; (To1\r\n <Identity>_N\r\n <a_a1Jb>_N\r\n (Sym (Coh (Sym (Coh <'Par1\r\n x_a1JZ>_N\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)))\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N)) ; (Coh <'Par1\r\n x_a1JZ>_N\r\n (Sym (D:R:Rep1Identity[0]) <a_a1Jb>_N) ; (Sym co_a1K0 ; Coh <Meth\r\n (From1\r\n x_a1Jc)>_N\r\n (D:R:Rep1Identity[0] <a_a1Jb>_N)))))_N))_R\r\n :: Sing ('Identity x_a1JZ) ~R# Sing (To1 (Meth (From1 x_a1Jc))))\r\n })\r\n `cast` (<Sing x_a1Jc>_R\r\n ->_R (Sing\r\n <Identity a_a1Jb>_N\r\n (Sym (D:R:GenericMeth[0]\r\n <Identity>_N <a_a1Jb>_N <x_a1Jc>_N) ; Sym co_a1Kd))_R\r\n :: (Sing x_a1Jc -> Sing (To1 (Meth (From1 x_a1Jc))))\r\n ~R# (Sing x_a1Jc -> Sing (Meth x_a1Jc)))\r\n }\r\nend Rec }\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/15724GHC panic with malformed pragma2019-07-07T18:03:15ZetorreborreGHC panic with malformed pragmaThis comment crashes GHC (the comment is not properly closed)
```hs
{-# OPTIONS_GHC -f-no-warn-orphans #}
```
```
ghc: panic! (the 'impossible' happened)
(GHC version 8.4.3 for x86_64-apple-darwin):
getOptions'.parseToks: C...This comment crashes GHC (the comment is not properly closed)
```hs
{-# OPTIONS_GHC -f-no-warn-orphans #}
```
```
ghc: panic! (the 'impossible' happened)
(GHC version 8.4.3 for x86_64-apple-darwin):
getOptions'.parseToks: Couldn't read " \"|\")) <> rand_bytes\n pure $ (==) hashed rehashed\n final = either (FailedToParse . show) (bool InValid Valid) result\n\n{-# ANN StateNamePrefix (Just (\"Test\" :: Text)) " as String
```https://gitlab.haskell.org/ghc/ghc/-/issues/15723-prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for externa...2019-07-07T18:03:15ZZejun Wu-prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for external symbolWhen compiling code with `-prof -fPIC -fexternal-dynamic-refs`, the generated object file may contains R_X86_64_PC32 relocation to symbols defined in another object file.
```
$ cat T15723A.hs T15723B.hs
module T15723A where
{-# INLINE ...When compiling code with `-prof -fPIC -fexternal-dynamic-refs`, the generated object file may contains R_X86_64_PC32 relocation to symbols defined in another object file.
```
$ cat T15723A.hs T15723B.hs
module T15723A where
{-# INLINE foo #-}
foo :: Int -> Int
foo x = {-# SCC foo1 #-} bar x
{-# NOINLINE bar #-}
bar :: Int -> Int
bar x = x
module T15723B where
import T15723A
test :: Int -> Int
test x = {-# SCC test1 #-} foo $ foo x
$ $HC -prof -prof -fPIC -fexternal-dynamic-refs -O2 -c T15723A.hs
$ $HC -prof -prof -fPIC -fexternal-dynamic-refs -O2 -c T15723B.hs
$ objdump -rdS T15723B.o | less
0000000000000028 <T15723B_test_info>:
28: 48 8d 45 f0 lea -0x10(%rbp),%rax
2c: 4c 39 f8 cmp %r15,%rax
2f: 72 70 jb a1 <T15723B_test_info+0x79>
31: 48 83 ec 08 sub $0x8,%rsp
35: 48 8d 35 00 00 00 00 lea 0x0(%rip),%rsi # 3c <T15723B_test_info+0x14>
38: R_X86_64_PC32 T15723B_test1_EXPR_cc-0x4
3c: 49 8b bd 60 03 00 00 mov 0x360(%r13),%rdi
43: 31 c0 xor %eax,%eax
45: e8 00 00 00 00 callq 4a <T15723B_test_info+0x22>
46: R_X86_64_PLT32 pushCostCentre-0x4
4a: 48 83 c4 08 add $0x8,%rsp
4e: 48 ff 40 30 incq 0x30(%rax)
52: 49 89 85 60 03 00 00 mov %rax,0x360(%r13)
59: 48 83 ec 08 sub $0x8,%rsp
5d: 48 8d 35 00 00 00 00 lea 0x0(%rip),%rsi # 64 <T15723B_test_info+0x3c>
60: R_X86_64_PC32 T15723A_foo1_EXPR_cc-0x4
```
When attempt to link both `T15723A.o` and `T15723B.o` in ghci using `+RTS -xp`, the address of `T15723A_foo1_EXPR_cc` can be more than 2G away from `T15723B_test_info` and cause link error or segfault.8.10.1Zejun WuZejun Wuhttps://gitlab.haskell.org/ghc/ghc/-/issues/15722Add -Wstar-is-type to the User's Guide2019-07-07T18:03:16ZVladislav ZavialovAdd -Wstar-is-type to the User's GuideDocumentation for `-Wstar-is-type` is missing in the 8.6.1 release.
Creating this ticket with a milestone as a reminder to cherry-pick the patch to 8.6.2 (right now it's merged to `master`).
<details><summary>Trac metadata</summary>
|...Documentation for `-Wstar-is-type` is missing in the 8.6.1 release.
Creating this ticket with a milestone as a reminder to cherry-pick the patch to 8.6.2 (right now it's merged to `master`).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 8.6.1 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Documentation |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | bgamari |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Add -Wstar-is-type to the User's Guide","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"8.6.2","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["bgamari"],"type":"Task","description":"Documentation for `-Wstar-is-type` is missing in the 8.6.1 release.\r\n\r\nCreating this ticket with a milestone as a reminder to cherry-pick the patch to 8.6.2 (right now it's merged to `master`).","type_of_failure":"OtherFailure","blocking":[]} -->8.6.2