As I said before, it still doesn't solve the problem I'm trying to solve. Look at a package like criterion, for example. criterion depends on aeson. Why? Because statistics depends on it. Why? Because statistics wants a couple types it defines to be instances of classes defined in aeson. John Lato's proposal would require the pragma to appear in the relevant aeson module, and would prevent *anyone* else from defining instances of those classes. With my proposal, statistics would be able to declare
{-# InstanceIn Statistics.AesonInstances AesonModule.AesonClass StatisticsType #-} Then it would split the Statistics.AesonInstances module off into a statistics-aeson package and accomplish its objective without stepping on anyone else. We'd get a lot more (mostly tiny) packages, but in exchange the dependencies would get much thinner. On Oct 21, 2014 11:52 AM, "Stephen Paul Weber" <singpol...@singpolyma.net> wrote: > Somebody claiming to be John Lato wrote: > >> Thinking about this, I came to a slightly different scheme. What if we >> instead add a pragma: >> >> {-# OrphanModule ClassName ModuleName #-} >> > > I really like this. It solve all the real orphan instance cases I've had > in my libraries. > > -- > Stephen Paul Weber, @singpolyma > See <http://singpolyma.net> for how I prefer to be contacted > edition right joseph >
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs