Lets say I have an injective type family T
type family T a = b | b -> a
My first question is there an way to write:
type family T' = the inverse of T
Without having to repeat all the instances of T
but in reverse.
Such that: T (X1 a (T' a)) = a
It seems like this should work, as both T
and T'
are injective, given one side it is mechanical to work out the other.
Anyway to write T'
?
a ~ T b
work ? – mb14type Tinv b = a
is rejected because the tyvara
must be mentioned in the arguments ofTinv
, which looks too restrictive when it is determined by them thanks to the fundeps in scope. – chi(a ~ T b) => Proxy a -> Proxy b
or equivalentlyProxy (T b) -> Proxy b
. – user2407038