Skip to content

Remove the magic from `Any`

The Any type used to be very highly magical: a poly-kinded type in a mono-kinded world. Then it became only normally magical: a datatype with a return kind of k (instead of *). Then it became only a bit magical: a closed type family with no equations. Now that we have non-magical empty closed type families, I believe that we can remove the last bit of magic and just define

type family Any :: k where { }

somewhere (GHC.Types?), wire it in (like, e.g., Bool), and be done with it.

Objections?

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information