We present the design of a compact module that converts the HARPS instrument at the 3.6-m telescope at La Silla to a full-Stokes high-resolution spectropolarimeter. The polarimeter will replace the obsolete Iodine cell inside the HARPS Cassegrain adapter. Utilizing the two fibers going into the spectrograph, two dual- beam systems can be positioned in the beam: one with a rotating superachromatic quarter-wave plate for circular polarimetry and one with a rotating superachromatic half-wave plate for linear polarimetry. A large polarimetric precision is ensured by the beam-exchange technique and a minimal amount of instrumental polarization. The polarimeter, in combination with the ultra- precise HARPS spectrograph, enables unprecedented observations of stellar magnetic fields and circumstellar material without compromising the successful planet-finding program.