I'm neck deep in some complex TemplateHaskell and am desperately looking for a function with the following type signature:
Language.Haskell.TH.Type -> Data.Proxy.Proxy a
Does something like this exist? I can appreciate that it would be hard to determine the type a
in the type-sig given above, but is there no way that that the compiler can look at what is inside Type
and figure out what a
should be?
Here's more context of the overall problem I'm trying to solve: I've "de-structured" a record-type via TH and have a value of [Type]
, where each element in the list corresponds to a field in the record. I need to pass each of these types to an existing function that takes only a Proxy a
. If it makes things easier, the original record already has an instance of Generic