defer generating type till fully resolved. fixes #6