Skip to content

Fix build for GHC 9.10.2 #4644

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

Merged
merged 1 commit into from
Jul 1, 2025
Merged

Conversation

sgillespie
Copy link
Collaborator

@sgillespie sgillespie commented Jul 1, 2025

This was introduced in #4632. The constructor for TypeEqMismatch changed at 9.10.2 (not at 9.12 as I previously thought)

Previously, this would fail on GHC 9.10.2 (nix-shell -p haskell.compiler.ghc9102 --command "cabal build all"):

src/Development/IDE/GHC/Compat/Error.hs:111:41: error: [GHC-27346]                                                                                                                                                                                             
    • The data constructor ‘TypeEqMismatch’ should have 7 arguments, but has been given 8                                                                                                                                                                      
    • In the pattern: TypeEqMismatch _ _ _ _ expected _ _ _                                                                                                                                                                                                    
      In an equation for ‘_TypeEqMismatchExpected’:                                                                                                                                                                                                            
          _TypeEqMismatchExpected                                                                                                                                                                                                                              
            focus                                                                                                                                                                                                                                              
            mismatch@(TypeEqMismatch _ _ _ _ expected _ _ _)                                                                                                                                                                                                   
            = (\ expected' -> mismatch {teq_mismatch_expected = expected'})                                                                                                                                                                                    
                <$> focus expected                                                                                                                                                                                                                             
    |                                                                                                                                                                                                                                                          
111 | _TypeEqMismatchExpected focus mismatch@(TypeEqMismatch _ _ _ _ expected _ _ _) =                                                                                                                                                                         
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                            
                                                                                                                                                                                                                                                               
src/Development/IDE/GHC/Compat/Error.hs:122:39: error: [GHC-27346]                                                                                                                                                                                             
    • The data constructor ‘TypeEqMismatch’ should have 7 arguments, but has been given 8                                                                                                                                                                      
    • In the pattern: TypeEqMismatch _ _ _ _ _ actual _ _                                                                                                                                                                                                      
      In an equation for ‘_TypeEqMismatchActual’:                                                                                                                                                                                                              
          _TypeEqMismatchActual                                                                                                                                                                                                                                
            focus                                                                                                                                                                                                                                              
            mismatch@(TypeEqMismatch _ _ _ _ _ actual _ _)                                                                                                                                                                                                     
            = (\ actual' -> mismatch {teq_mismatch_expected = actual'})                                                                                                                                                                                        
                <$> focus actual                                                                                                                                                                                                                               
    |                                                                                                                                                                                                                                                          
122 | _TypeEqMismatchActual focus mismatch@(TypeEqMismatch _ _ _ _ _ actual _ _) =                                                                                                                                                                             
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                
                                                                                                                                                                                                                                                               
Error: [Cabal-7125]                                                                                                                                                                                                                                            
Failed to build ghcide-2.11.0.0 (which is required by exe:ghcide from ghcide-2.11.0.0). 

The constructor for `TypeEqMismatch` changed at 9.10.2 (not at 9.12 as I
previously thought)
@sgillespie sgillespie requested a review from wz1000 as a code owner July 1, 2025 13:25
@fendor fendor added the merge me Label to trigger pull request merge label Jul 1, 2025
@mergify mergify bot merged commit 29b2ecb into haskell:master Jul 1, 2025
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants