Big sum up of everything:<br><br>If TestN is a newtype constructor, then<br>&#39;<span style="font-family:courier new,monospace">TestN undefined</span>&#39; and &#39;<span style="font-family:courier new,monospace">undefined</span>&#39; are exactly the same thing.<br>

<br><br><div class="gmail_quote">2012/1/22 Yitzchak Gale <span dir="ltr">&lt;<a href="mailto:gale@sefer.org">gale@sefer.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">Yves Parès wrote:<br>
&gt;&gt; Is there some litterature expliciting in a less empiric way than I did the<br>
&gt;&gt; differences like this between data and newtype? I&#39;ve never come against<br>
&gt;&gt; such documentation through all my learning of Haskell, yet I think it&#39;s an<br>
&gt;&gt; important point.<br>
<br>
</div><div class="im">Roman Cheplyaka wrote:<br>
&gt; See the Haskell report, section <a href="tel:3.17.2" value="+333172">3.17.2</a> &quot;Informal Semantics of Pattern<br>
&gt; Matching&quot; [1].<br>
<br>
</div>And section 4.2.3 of the report [2] addresses exactly your points very<br>
explicitly:<br>
<br>
&quot;A type created by newtype differs from an algebraic datatype in that...<br>
The following examples clarify the differences between data<br>
(algebraic datatypes), type (type synonyms), and newtype<br>
(renaming types)...&quot;<br>
<br>
Regards,<br>
Yitz<br>
<br>
[1] <a href="http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-600003.17.2" target="_blank">http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-600003.17.2</a><br>
[2] <a href="http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-740004.2.3" target="_blank">http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-740004.2.3</a><br>
</blockquote></div><br>