The linear prelude exports
asTypeOf :: a %q-> a -> a
asTypeOf = const
That seems practically useless in a linear context. The traditional alternative is found in Data.Proxy, and can be given the following type:
asProxyTypeOf :: a %q-> proxy a -> a
asProxyTypeOf a _ = a
Of course, if one is using TypeApplications, id is also an option. But I'd consider just removing asTypeOf here.
The linear prelude exports
That seems practically useless in a linear context. The traditional alternative is found in
Data.Proxy, and can be given the following type:Of course, if one is using
TypeApplications,idis also an option. But I'd consider just removingasTypeOfhere.