The complex-generic package

The base package's Data.Complex has a RealFloat requirement for
almost all operations, which rules out uses such as 'Complex Rational'
or 'Complex Integer'. This package provides an alternative, putting
most operations into additional type classes. Generating instances
with template haskell helps reduce excessive boilerplate and avoids
instance overlap.