Hans patch to add Num and Enum instances