Support unit in patterns (closes #219).