I read an article about static typing the other day (https://bsamuels.net/2013/11/20/static-typing.html) that described an interesting concept called "type-rich programming", where you as a programmer define types that, to the machine, are simply aliases for existing types (such as integers or floats), but to you they describe the difference between different quantities that could be represented using those machine types (e.g., seconds and meters could both be represented by doubles, but you certainly wouldn't want to add them together).
I know that Common Lisp is a dynamically-typed language. However, I also know that some compilers (such as the one that I use, SBCL) will do some limited type checking if I use the
and check-type
. How can I create type aliases so that I can provide richer types to SBCL? Or, if not that, then how can I get something that looks sort of like type-rich programming in Common Lisp?