Repository navigation
Conversation
- Stop re-exporting Control.Monad and Control.Monad.Fix from each non-*.Class module - Stop re-exporting Control.Monad.IO.Class from Control.Monad.Trans - Stop re-exporting Data.Monoid from Control.Monad.Writer.*
|
@chessai should it instead explicitly reexport the things we expect to be provided? (aka , reexport MonadIO etc, explicitily rather than whatever is in the whole module?) |
|
Hmm @cartazio isn't that still in violation of PVP? Or am I mistaken? |
|
@chessai you can https://pvp.haskell.org/ see in the PVP, that its about "invisibly varying" reexports I think? Like if you did an explicit import list aka
My concern is mostly, this alternative would a) fix the leaky exports issue and b) avoid the needlessly breaking stuff that was picking up those classes via the MTL reexports? i could be totally missing something though |
|
@chessai Alternatively, if we can grep all uses of MTL on hackage, for most recent releases on hackage, to determine what would be broken possibly, that would be fine too. Just its good to do mix of some sort of empirical what would be broken by this impact assement. |
|
@cartazio i think that grep should happen at the very least. im about to divert my attention to something else for the rest of the day |
|
I tried three random packages and this change breaks all three of them (see PRs above). To be honest, I don't think it's reasonable to push this any further. |
|
Another option is to re-export not original functions, but wrappers with deprecation warnings like this: fix :: (a -> a) -> a
fix = Data.Function.fix
{-# DEPRECATED fix "Export fix directly from Data.Function" #-}Still not sure whether this justifies the amount of work involved. |
|
Per the recent discussion in #69, would this be worth the effort if |
|
@Bodigrim: Pushing wrappers will break even more folks in a much much worse way, because if you import them from the right place they'll collide, whereas no interim wrappers means you just add a couple of extra imports and you work across old and new versions of the library. Without those shims they have a reasonably straightforward path to add a couple of imports to get things from the canonical locations. We'd put very loud warnings on the package, and folks would grumble and fix it. But with them there is no option but to use qualified imports for every import of almost any module from the The breakage from mtl 1 to mtl 2 was considerably worse than the breakage would be here with no mitigation. This would definitely be a major revision, but it'd fix one of the largest long standing warts in the core libraries. |
|
This item has been lurking near the top of my TODO list for years now. I do consider it worth suffering the disruption of a first-digit major release, and loud announcement process. |
|
@ekmett There are 3700+ reverse dependencies of (This is why I suggested that ugly hack with wrappers: at least there would be no build errors. At a price of much more churn to fix deprecation warnings, agreed.) I mean, this is probably a good showcase why upper bounds for core libraries are so important. One can start a preliminary campaign of preventive PRs (put upper bound + import stuff from home packages), probably. |
|
I'd rather not add bounds pre-emptively. There are massive amount of packages lacking |
If I This is the same thing as happens with So, er.. your Keep in mind any release would be tied to a major GHC release, a time at which users who already have bad upper bounds on To do your |
|
@ekmett agreed, I forgot that
IMHO there is a difference. Significant breaking changes in Perhaps my problem here is that I personally do not see much added value in this change. I mean, sure, it would be nice to structure |
|
An example that was particularly galling for a long time during the Working on some abstract algebra and want to use the name The other main issue is PVP issue, where re-exports here effectively tie us to changes to There's also a minor issue of signalling about proper API design. Folks emulate core libraries all the time, and the |
|
In my experience, updating to newer GHC/ It would be nice to sweeten such breaking changes by simultaneous improvements / new features in other areas. Like catching up with |
|
I must emphasize that this is a huge change breaking every other package (and IMO it is not worth to fix a subtle PVP issue in such way, but whatever). I think it deserves to be clearly announced and explained at libraries maillist. |
|
@Bodigrim we are planning on this months from now, with as much tooling guidance, announcing, and help as possible. |
|
Marking this as MTL 3 milestone |
|
@kozross i believe it did yes |
|
@emilypi Then we should close this. |
non-*.Class module
Resolves #68
cc @phadej @ekmett