A differential module is just a module with a square zero endomorphism. Given a module map $f: M \rightarrow M$ of degree $a$, we represent a differential module from $f$ as a 3-term chain complex in homological degrees $-1, 0$, and $1$. If $a \neq 0$, then since the source and target of $f$ are required to be equal, we must specify the degree of the differential to be $a$ in order for the differential to be homogeneous.
The object DifferentialModule is a type, with ancestor classes Complex < MutableHashTable < HashTable < Thing.