ghc panic: mergeSATInfo
ghc panic with option `-O` and `-fstatic-argument-transformation`.
Affected versions include 8.2.2 and HEAD (8.5.20180108)
```hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module T12844 where
barWraper :: ('(r,r') ~ Head rngs, Foo rngs) => FooData rngs
barWraper = bar
bar :: (_) => FooData rngs
bar = barWraper
data FooData rngs
class Foo xs where foo :: (Head xs ~ '(r,r')) => FooData xs
type family Head (xs :: [k]) where Head (x ': xs) = x
```
Log:
```
ghc: panic! (the 'impossible' happened)
(GHC version 8.5.20180108 for x86_64-unknown-linux):
mergeSATInfo
Left:STSTSTSTSTSVSV, Right:STSTSTSTSTSVSC
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
pprPanic, called at compiler/simplCore/SAT.hs:152:20 in ghc:SAT
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghc panic: mergeSATInfo","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"ghc panic with option `-O` and `-fstatic-argument-transformation`.\r\nAffected versions include 8.2.2 and HEAD (8.5.20180108)\r\n\r\n{{{#!hs\r\n{-# LANGUAGE DataKinds #-}\r\n{-# LANGUAGE PartialTypeSignatures #-}\r\n{-# LANGUAGE PolyKinds #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\n{-# LANGUAGE TypeOperators #-}\r\n\r\nmodule T12844 where\r\n\r\nbarWraper :: ('(r,r') ~ Head rngs, Foo rngs) => FooData rngs\r\nbarWraper = bar\r\n\r\nbar :: (_) => FooData rngs\r\nbar = barWraper\r\n\r\ndata FooData rngs\r\n\r\nclass Foo xs where foo :: (Head xs ~ '(r,r')) => FooData xs\r\n\r\ntype family Head (xs :: [k]) where Head (x ': xs) = x\r\n}}}\r\n\r\nLog:\r\n\r\n{{{\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.5.20180108 for x86_64-unknown-linux):\r\n\tmergeSATInfo\r\n Left:STSTSTSTSTSVSV, Right:STSTSTSTSTSVSC\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/simplCore/SAT.hs:152:20 in ghc:SAT\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->
issue