Use FlexibleInstances for `Outputable (* p)` instead of match-all instances...
Use FlexibleInstances for `Outputable (* p)` instead of match-all instances with equality constraints In #17304, Richard and Simon dicovered that using `-XFlexibleInstances` for `Outputable` instances of AST data types means users can provide orphan `Outputable` instances for passes other than `GhcPass`. Type inference doesn't currently to suffer, and Richard gave an example in #17304 that shows how rare a case would be where the slightly worse type inference would matter. So I went ahead with the refactoring, attempting to fix #17304.
Showing
- compiler/GHC/Hs.hs 1 addition, 1 deletioncompiler/GHC/Hs.hs
- compiler/GHC/Hs/Binds.hs 23 additions, 25 deletionscompiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs 54 additions, 53 deletionscompiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs 57 additions, 57 deletionscompiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Expr.hs-boot 10 additions, 9 deletionscompiler/GHC/Hs/Expr.hs-boot
- compiler/GHC/Hs/Extension.hs 9 additions, 9 deletionscompiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/ImpExp.hs 4 additions, 3 deletionscompiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Lit.hs 4 additions, 3 deletionscompiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Pat.hs 7 additions, 7 deletionscompiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Pat.hs-boot 2 additions, 1 deletioncompiler/GHC/Hs/Pat.hs-boot
- compiler/GHC/Hs/Types.hs 26 additions, 26 deletionscompiler/GHC/Hs/Types.hs
- compiler/parser/RdrHsSyn.hs 6 additions, 5 deletionscompiler/parser/RdrHsSyn.hs
- compiler/typecheck/TcAnnotations.hs 1 addition, 1 deletioncompiler/typecheck/TcAnnotations.hs
- compiler/typecheck/TcBinds.hs 2 additions, 2 deletionscompiler/typecheck/TcBinds.hs
- compiler/typecheck/TcEnv.hs 2 additions, 2 deletionscompiler/typecheck/TcEnv.hs
- compiler/typecheck/TcRnExports.hs 1 addition, 1 deletioncompiler/typecheck/TcRnExports.hs
- utils/haddock 1 addition, 1 deletionutils/haddock
Loading
Please register or sign in to comment