Change the definition of recip in the instance of Fractional for Ratio, to: recip (x:%y) = y % x as per the revised Haskell 98 report.