Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin breakage in combination with Aeson #354

Open
sorki opened this issue Jun 26, 2020 · 3 comments
Open

Plugin breakage in combination with Aeson #354

sorki opened this issue Jun 26, 2020 · 3 comments

Comments

@sorki
Copy link

sorki commented Jun 26, 2020

Some weird interaction with Generics or ToJSON results in GHC panic.

Reproducer sorki/polytype@abc11ab

Complete file https://github.com/sorki/polytype/blob/abc11abbd00528b50a5e7f6fd7593fb2d562b059/src/Polytype/Asciinema.hs

Edit: GHC 8.10.1

@tek
Copy link
Member

tek commented Aug 18, 2020

For searchability, because I just spent quite some time on this:

Error:

<no location info>: error:                            
    ghc: panic! (the 'impossible' happened)                                                                  
  (GHC version 8.10.1:                                                                                       
        mergeSATInfo                                        
  Left:STSVSVSVSVSV, Right:STNSSVSCSVSC                                                                      
  Call stack:                                               
      CallStack (from HasCallStack):                                                                         
        callStackDoc, called at compiler/utils/Outputable.hs:1179:37 in ghc:Outputable                                  
        pprPanic, called at compiler/simplCore/SAT.hs:152:20 in ghc:SAT    

Workaround so you don't have to deactivate the plugin project-wide:

 {-# OPTIONS_GHC -fclear-plugins #-}

@tek
Copy link
Member

tek commented Sep 30, 2020

FTR, I noticed that only get panics in my projects with -O2.

so I use this:

when:
  - condition: 'impl(ghc < 8.10)'
    ghc-options: -O2

@Anrock
Copy link

Anrock commented Mar 26, 2021

GHC ticket seems to be related: https://gitlab.haskell.org/ghc/ghc/-/issues/14649, fendor provided minimal repro with aeson there. I'm hitting similar panic, but not using aeson in my project and I don't have minimal repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants