title: What is the effect of mapping with a newtype constructor
body: <p>In Chapter 8 of <a href="https://leanpub.com/thinking-with-types" rel="noreferrer">thinking with types</a> I learned that the <code>fmap Sum</code> part of</p>
  <pre class="lang-hs prettyprint-override"><code>fastSum :: [Int] -&gt; Int
  fastSum = getSum . mconcat . fmap Sum
  </code></pre>
  <p>has a <code>O(n)</code> runtime cost, whereas using <code>coerce</code> instead avoids that overhead.</p>
  <p>I know <code>newtype</code>s have no representation overhead, but what I do not understand is what is the runtime effect of mapping a newtype constructor over a list. I thought this would only have a compile-time overhead, and it should be just <code>O(1)</code>, since the compiler only needs to know the type of the <code>fmap SomeNewtypeCtr</code> expression.</p>