design a source type constructor; improve error messages for a invalid calls