Consider the Arrows
, Domains
and CoDomain
type-families defined in the agda
codebase.
Obvious to the programmer, it holds that Arrows (Domains func) (CoDomain func) ~ func
. But I can't get curries (Proxy :: Proxy (Domains func)) (Proxy :: Proxy (CoDomain func)) undefined :: func
through GHC's type-checker. That's because GHC isn't smart enough to infer that the combination of Domains
and CoDomain
is injective. Is there a way to teach GHC nonetheless? I'd imagine some case split over the IsBase
predicate.