Since Proxy
contains no runtime information, you can always write a natural transformation f a -> Proxy a
for any f
.
proxy :: f a -> Proxy a
proxy _ = Proxy
This is just like how any given value can always be erased to ()
:
unit :: a -> ()
unit _ = ()
Technically, Proxy
is the terminal object in the category of functors, just like ()
is the terminal object in the category of values.