title: How to tell that common subexpression elimination is happening or not in GHC?
body: <p>Let's say I have a naively implemented function like this:</p>
  
  <pre><code>quadratic a b c = (ans1, ans2)
    where
      ans1 = ((-b) + sqrt (b * b - 4 * a * c)) / (2 * a)
      ans2 = ((-b) - sqrt (b * b - 4 * a * c)) / (2 * a)
  </code></pre>
  
  <p>There are multiple identical subexpressions. How can I tell without reading core that common subexpression elimination is happening or not and to which parts of this?</p>