fix a potential serialization problem

t->name might eventually refer to an array, and deserializing an array
requires its type's parameters, so restore t->parameters before t->name.
remove some print_ and escaping function exports