@antc2 you have misunderstand my post in the way I feared would happen.
Right now, all these changes to base we can’t even seriously debate because there would be far to much breakage simply because users are stuck with the version of base
GHC ships with. With the decoupling, we at least expand the overton window on things the CLC can consider, and I think that is very good ----- even if none of those no longer beyond the pale changes end up being accepted.
Also, see what @atravers linked in Pre-Pre-HFTP: Decoupling base and GHC - #43 by atravers ; there is better motivation there than what I wrote.
Speaking of String
, here’s a very good example. I actually have little problem with [Char]
being easily obtained from literals — for if beginners need to eliminate strings, this is gentlest way there is. The real problem with String
is not that it exists, or even that interfaces that use it exist, but that type classes do ridiculous shit to support it.
For example, the Read
class is a disaster:
class Read a where
readsPrec :: Int -> ReadS a
readList :: ReadS [a]
readPrec :: ReadPrec a
readListPrec :: ReadPrec [a]
the bottom two are proposed to be replaced…we should have a deprecated cycle to move them outside the class then, just like return = pure
should become mandatory. So:
class Read a where
readPrec :: ReadPrec a
readListPrec :: ReadPrec [a]
But then readListPrec
is a hack for String
. If we had
newtype String = String [Char]
that could have the string literate instance, and then we can delete readListPrec
readListPrec
and friends are, in my view, overloaded instances laundered as extra methods. Not good!