We already have the dynamically checked physical units
provided by Number.Physical
and the statically checked ones of the dimensional package of Buckwalter,
which require multi-parameter type classes with functional dependencies.
Here we provide a poor man's approach:
The units are presented by type terms.
There is no canonical form and thus the type checker
can not automatically check for equal units.
However, if two unit terms represent the same unit,
then you can tell the type checker to rewrite one into the other.
You can add more dimensions by introducing more types of class C.
This approach is not entirely safe
because you can write your own flawed rewrite rules.
It is however more safe than with no units at all.