change type representation from Text to TypeRep