Skip to content

fails to build with ghc-9.12.2 #53

@juhp

Description

@juhp

For Stackage Nightly:

      /home/curators/work/unpack-dir/unpacked/calligraphy-0.1.8-2dbf9da08fad9c21855ab7d6dd490f3f6745658d47e914:19:56 [25059/942486]
c/Calligraphy/Compat/Debug.hs:41:12: error: [GHC-27346]                                                                             
           • The data constructor ‘HieFile’ should have 7 arguments, but has been given 6
           • In the pattern:
               HieFile path (GHC.Module _ mdl) _types (HieASTs asts) _exps _src
             In an equation for ‘ppHieFile’:
                 ppHieFile
                   (HieFile path (GHC.Module _ mdl) _types (HieASTs asts) _exps _src)
                   = do strLn "Hie File"
                        indent
                          $ do strLn "path:"
                               ....
          |
       41 | ppHieFile (GHC.HieFile path (GHC.Module _ mdl) _types (GHC.HieASTs asts) _exps _src) = do
          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       /home/curators/work/unpack-dir/unpacked/calligraphy-0.1.8-2dbf9da08fad9c21855ab7d6dd490f3f6745658d47e982e3385ea872c0edb1da/src/Calligraphy/Phases/Parse.hs:14:19:56 [25005/885210]
46]                                                                                                                                                                                      
           • The data constructor ‘HieFile’ should have 7 arguments, but has been given 6                                                                                                
           • In the pattern: HieFile filepath mdl _ _ avails _                              
             In an equation for ‘parseHieFile’:                                             
                 parseHieFile file@(HieFile filepath mdl _ _ avails _)                                                                                                                   
                   = do lextree <- either                                                                                                                                                
                                     (throwError . TreeError modname filepath) pure                                                                                                      
                                     $ structure decls                                      
                        let calls = ...                                                                                                                                                  
                        forest <- forestT (mkDecl exportKeys) (mkForest lextree)                                                                                                         
                        ....                                                                
                   where                                                                    
                       modname = GHC.moduleNameString (GHC.moduleName mdl)                                                                                                               
                       exportKeys                                                           
                         = EnumSet.fromList $ fmap ghcNameKey $ avails >>= GHC.availNames                                                                                                
                       Collect decls useSites types = collect file                                                                                                                       
                       resolveCalls :: LexTree Loc GHCKey -> Set (GHCKey, GHCKey)                                                                                                        
                       ....                                                                 
           |                                                                                
       141 | parseHieFile file@(GHC.HieFile filepath mdl _ _ avails _) = do                                                                                                              
           |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                    
                                                                                            
       /home/curators/work/unpack-dir/unpacked/calligraphy-0.1.8-2dbf9da08fad9c21855ab7d6dd490f3f6745658d47e982e3385ea872c0edb1da/src/Calligraphy/Phases/Parse.hs:208:10: error: [GHC-273
46]                                           
           • The data constructor ‘HieFile’ should have 7 arguments, but has been given 6                                                                                                
           • In the pattern: HieFile _ _ typeArr (HieASTs asts) _ _                                                                                                                      
             In an equation for ‘collect’:                                                                                                                                               
                 collect (HieFile _ _ typeArr (HieASTs asts) _ _)                           
                   = execState (forT_ traverse asts go) (Collect mempty mempty mempty)                                                                                                   
                   where                                                                                                                                                                 
                       tellDecl :: GHC.Name -> DeclType -> RealSrcSpan -> State Collect ()                                                                                               
                       tellDecl nm typ spn                                                  
                         = modify                                                           
                             $ \ (Collect decls uses types) -> Collect (decl : decls) uses types                                                                                         
                         where                
                             decl                                                           
                               = RawDecl                                                    
                                   (GHC.getOccString nm) (EnumSet.singleton . ghcNameKey $ nm) typ                                                                                       
                                   (Loc (srcSpanStartLine spn) (srcSpanStartCol spn))                                                                                                    
                                   (Loc (srcSpanEndLine spn) (srcSpanEndCol spn))                                                                                                        
                       tellUse :: RealSrcLoc -> GHCKey -> State Collect ()                                                                                                               
                       tellUse loc key                                                      
                         = modify                                                           
                             $ \ (Collect decls uses types) -> Collect decls (... : uses) types                                                                                          
                       ....                   
           |                                                                                                                                                                             
       208 | collect (GHC.HieFile _ _ typeArr (GHC.HieASTs asts) _ _) = execState (forT_ traverse asts go) (Collect mempty mempty mempty)
           |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions