derive Typeable for all data types used in Prims

Depends on diagrams/diagrams-core#42.