Add support for creating new named types

The named types are currently limited to pre-defined scalar types. It would be interesting to support the addition of new types.