Add the def-type macro to macro away some patterns in the type definition code