RE: [commit: ghc] wip/generics-flip: Flip around imports of GHC.Generics (cb12bdf)
I don’t object to this, but I suspect that it's just covering up some other bug. Simon -----Original Message----- From: ghc-commits [mailto:ghc-commits-bounces@haskell.org] On Behalf Of git@git.haskell.org Sent: 18 July 2016 14:57 To: ghc-commits@haskell.org Subject: [commit: ghc] wip/generics-flip: Flip around imports of GHC.Generics (cb12bdf) Repository : ssh://git@git.haskell.org/ghc On branch : wip/generics-flip Link : https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fghc.haskell....
---------------------------------------------------------------
commit cb12bdf942df5e61771d69bbb6049f3b23ed580c Author: Ben Gamari <ben@smart-cactus.org> Date: Mon Jul 18 15:54:16 2016 +0200 Flip around imports of GHC.Generics Previously we had, GHC.Generics imports GHC.Ptr Data.Monoid imports GHC.Generics Data.Foldable imports GHC.Generics Data.Foldable imports Data.Monoid Prelude imports Data.Foldable Unfortunately this meant that any program importing Prelude (essentially all programs) would end up pulling in GHC.Generics and GHC.Ptr unnecessarily. Hopefully helps #12367.
---------------------------------------------------------------
cb12bdf942df5e61771d69bbb6049f3b23ed580c libraries/base/Data/Foldable.hs | 36 ---------------------- libraries/base/Data/Monoid.hs | 19 +++++------- libraries/base/GHC/Generics.hs | 67 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 72 insertions(+), 50 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc cb12bdf942df5e61771d69bbb6049f3b23ed580c _______________________________________________ ghc-commits mailing list ghc-commits@haskell.org https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.haskell...
Simon Peyton Jones via ghc-devs <ghc-devs@haskell.org> writes:
I don’t object to this, but I suspect that it's just covering up some other bug.
Indeed, I concluded the same after our chat today. I've made a bit of progress tracking down the cause of GHC.Generics being loaded when looking for a `Foldable []` instance. It looks like the cause is the evaluation of the `mod` binding in IfaceEnv.instIsVisible. The RHS of this binding pulls on is_dfun to get its `idName` (which it only need the Module from). I'm afraid I'll need to pick this up tomorrow though; it's getting rather late. I'll paste the above in the ticket to ensure it isn't lost. Cheers, - Ben
participants (2)
-
Ben Gamari -
Simon Peyton Jones