[Haskell-cafe] Lifting a value into a DataKind
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Tue Feb 7 23:55:29 UTC 2017
Is it possible to automatically lift an arbitrary value into a type?
i.e. I'm after a function of type `a -> Proxy (b :: a)`.
More specifically, I'm wanting to be able to write a function that can
convert an Enum (e.g. Bool or Ord) into such a Proxy, so I can
actually write a function that looks like: `a -> (forall b. Proxy (b
:: a) -> r) -> r` and use the `a` type as a selector value (to e.g.
choose between type class instances).
--
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com
More information about the Haskell-Cafe
mailing list