Torsion (of a manifold) as a function on the variety of representations (of its fundamental group)