Add a typeOid field to the Field record
Switch from unsafePerformIO to unsafeDupablePerformIO