The derivative of a type is the type of its type of one-hole contexts. This is the type that we would get if we make a type variable disappear in every possible point and sum the results.
As an example, we can take the triple type (a,a,a)
, and derive it, obtaining
data OneHoleContextsOfTriple = (a,a,()) | (a,(),a) | ((),a,a)
This is coherent with our usual definition of derivation, as:
d/da (a*a*a) = 3*a*a
More on this topic can be read on this article.