copied over type modules from parakeet