<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 "typefulness" protection that "newtype" affords over the "Klingon " "type" ... In the code that I contributed to the library, I like to think that I used "newtype" 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"><<a href="mailto:dons@galois.com">dons@galois.com</a>></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">> Hello,<br>
><br>
> I am reading some extant Haskell code that uses Posix signals.... I am<br>
> confused by the motivation of the following ...<br>
><br>
</div>> type [1]Signal = [2]CInt<br>
> [3]nullSignal :: [4]Signal<br>
> [5]internalAbort :: [6]Signal<br>
> [7]sigABRT :: [8]CInt<br>
> [9]realTimeAlarm :: [10]Signal<br>
> [11]sigALRM :: [12]CInt<br>
> [13]busError :: [14]Signal<br>
> [15]sigBUS :: [16]CInt<br>
<div class="Ih2E3d">><br>
> OK .. "type" is really just a synomym and doesn't invoke type checking<br>
> like "data" type declarations do .. so why don't we have all the "CInts"<br>
> substituted by "Signal"? 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>