I'm opposed to moving it to base. This locks in base to GHC's fundamentally broken model of IO (in terms of functions passing state tokens) and also ties together the fundamentally different concepts of IO and ST. These issues tend to crop up in strictness analysis, and GHC has to continually tweak various internal hacks to keep users from noticing (most of the time). Let's not make future Haskells make these same decisions.

On Mon, Jun 8, 2020, 9:18 AM Carter Schonwald <carter.schonwald@gmail.com> wrote:
This is something I’ve pondered on and off, And the classes PrimMonad and PrimMonadBase are super stable  


Argument in favor of base : 

there’s absolutely code in base, and packages like array, which would benefit from PrimMonad.   Plus it might allow more reuse / encourage more ST monad code in the wild? (I always feel like ST monad is underused. )

Argument against base: 
Then a lot of PrimMonad instances would need to live in transformers. And I’m not sure if maintainers over there would want that? 

Argument in favor of mtl: it’s where all the other transformer stack stuff gets defined. So all the upkeep for monad instances is already going on there regularly. 

Argument against mtl :  aside from concentrating the upkeep on transformer stack instances it seems like it wouldn’t enable new improvements to base.  


Another option is to have some sort of clone of the class in base , as long as it pays for itself in code reuse / simplification within base
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries