Refactoring: Consolidate some arguments with DerivInstTys
Various functions in GHC.Tc.Deriv.* were passing around `TyCon`s and `[Type]`s that ultimately come from the same `DerivInstTys`. This patch moves the definition of `DerivInstTys` to `GHC.Tc.Deriv.Generate` so that all of these `TyCon` and `[Type]` arguments can be consolidated into a single `DerivInstTys`. Not only does this make the code easier to read (in my opinion), this will also be important in a subsequent commit where we need to add another field to `DerivInstTys` that will also be used from `GHC.Tc.Deriv.Generate` and friends.
Showing
- compiler/GHC/Tc/Deriv.hs 8 additions, 18 deletionscompiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Functor.hs 12 additions, 9 deletionscompiler/GHC/Tc/Deriv/Functor.hs
- compiler/GHC/Tc/Deriv/Generate.hs 54 additions, 21 deletionscompiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs 21 additions, 20 deletionscompiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Deriv/Utils.hs 40 additions, 73 deletionscompiler/GHC/Tc/Deriv/Utils.hs
Loading
Please register or sign in to comment