title: How to convert a Rational into a "pretty" String?
body: <p>I want to display some <code>Rational</code> values in their decimal expansion.  That is, instead of displaying <code>3 % 4</code>, I would rather display <code>0.75</code>.  I'd like this function to be of type <code>Int -&gt; Rational -&gt; String</code>.  The first <code>Int</code> is to specify the maximum number of decimal places, since <code>Rational</code> expansions may be non-terminating.</p>
  
  <p><a href="https://www.haskell.org/hoogle/?hoogle=Int%20-%3E%20Rational%20-%3E%20String" rel="noreferrer">Hoogle</a> and the <a href="https://hackage.haskell.org/package/base-4.8.0.0/docs/Data-Ratio.html" rel="noreferrer">haddocks for Data.Ratio</a> didn't help me.  Where can I find this function?</p>