<div dir="ltr">Thanks Don. Maybe both for me and others in order to take the fight to the Klingons and other Baddies, please explain the &quot;typefulness&quot; protection that &quot;newtype&quot; affords over the &quot;Klingon &quot; &quot;type&quot; ...&nbsp; In the code that I contributed to the library, I like to think that I used &quot;newtype&quot; appropriately but not perhaps with full understanding.<br>
<br>Thanks, Vasili<br><br><br><div class="gmail_quote">On Mon, Oct 6, 2008 at 12:37 AM, Don Stewart <span dir="ltr">&lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
vigalchin:<br>
<div class="Ih2E3d">&gt; &nbsp; &nbsp;Hello,<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; I am reading some extant Haskell code that uses Posix signals.... I am<br>
&gt; &nbsp; &nbsp;confused by the motivation of the following ...<br>
&gt;<br>
</div>&gt; &nbsp; &nbsp;type [1]Signal = [2]CInt<br>
&gt; &nbsp; &nbsp;[3]nullSignal :: [4]Signal<br>
&gt; &nbsp; &nbsp;[5]internalAbort :: [6]Signal<br>
&gt; &nbsp; &nbsp;[7]sigABRT :: [8]CInt<br>
&gt; &nbsp; &nbsp;[9]realTimeAlarm :: [10]Signal<br>
&gt; &nbsp; &nbsp;[11]sigALRM :: [12]CInt<br>
&gt; &nbsp; &nbsp;[13]busError :: [14]Signal<br>
&gt; &nbsp; &nbsp;[15]sigBUS :: [16]CInt<br>
<div class="Ih2E3d">&gt;<br>
&gt; &nbsp; &nbsp;OK .. &quot;type&quot; is really just a synomym and doesn&#39;t invoke type checking<br>
&gt; &nbsp; &nbsp;like &quot;data&quot; type declarations do .. so why don&#39;t we have all the &quot;CInts&quot;<br>
&gt; &nbsp; &nbsp;substituted by &quot;Signal&quot;? I.e. what did I miss?<br>
<br>
</div>Looks like it should all be Signal, and probably should be using a<br>
newtype, to prevent funky tricks. The Posix layer is a bit crufty.<br>
<font color="#888888"><br>
-- Don<br>
</font></blockquote></div><br></div>