Move primitives in their own submodule.
Add basic type predicates to the primitives.