GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2021-05-17T16:05:16Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/9975RecordWildcards and PatternSynonyms cause impossible bug2021-05-17T16:05:16ZgamegoblinRecordWildcards and PatternSynonyms cause impossible bugWhen using RecordWildcards with PatternSynonyms, I have found a way to cause this bug:
```
$ /usr/local/bin/ghc-7.10.0.20141222 test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
ghc: panic! (the 'impossible' happened)
(...When using RecordWildcards with PatternSynonyms, I have found a way to cause this bug:
```
$ /usr/local/bin/ghc-7.10.0.20141222 test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.0.20141222 for x86_64-apple-darwin):
find_tycon
Test
[Test defined at test.hs:6:9,
Test parent:Test defined at test.hs:4:13]
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
Here is the full code that causes it:
```hs
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternSynonyms #-}
data Test = Test { x :: Int }
pattern Test wat = Test { x = wat }
```
If you remove `RecordWildCards`, the bug does not happen.7.10.1