Skip to content

Add to Data.Proxy a utility function proxy :: a -> Proxy a

I sometime find myself wanting to create a Proxy of a certain type (to pass into functions that use Proxy), but I only have easy access to the value, but not the type (eg. because the type is being inferred). That is, I find myself defining the following function

proxy :: a -> Proxy a
proxy _ = Proxy

It would be great if something like that could be added to Data.Proxy

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