Hi!
I must say that I do not really understand this, but I nevertheless doubt that it solves my problem. In your code, you are already starting with the value IsListType whose type you specify as [a]. In this case, there is nothing to find out about the element type; you already know that it is a. My situation is that I have some type l and a value p :: IsListType l. A successful match of p against the pattern IsListType tells me that there is an a with l ~ [a]. However, I cannot refer to this a.
All the best,
Wolfgang
Am Donnerstag, den 10.08.2017, 16:35 -0700 schrieb Michael Burge:
Could something like this work for you? Here, a ~ b and you have access to b:
case (IsListType :: IsListType [a], Proxy :: Proxy a) of (_, proxy :: Proxy b) -> asProxyTypeOf undefined proxy :: b