<div>If I change </div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; data Sigval = SivalInt Int | SivalPtr (Ptr Char) <br></div>
<div>to ...</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;newtype Sigval = Sivalint Int | SivalPtr (Ptr Char) </div>
<div>&nbsp;</div>
<div>then my test case builds and links. ??</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Regards, Vasili</div>
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">On Mon, Jun 9, 2008 at 11:01 PM, Galchin, Vasili &lt;<a href="mailto:vigalchin@gmail.com">vigalchin@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I have tried various things to no avail .... 
<div class="Ih2E3d"><br><br>vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell Setup.lhs build<br>Preprocessing executables for Test-1.0...<br>Building Test-1.0...<br>[1 of 1] Compiling Main&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ./timer.hs, dist/build/timer/timer-tmp/Main.o )<br>
<br></div>./timer.hs:22:0:<br>&nbsp;&nbsp;&nbsp; Unacceptable argument type in foreign declaration: Sigval<br>&nbsp;&nbsp;&nbsp; When checking declaration:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreign import ccall safe &quot;wrapper&quot; mkNotify<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :: Notify -&gt; IO (FunPtr Notify)<br>
<br>=&gt; here is my Sigval def<br><br>data Sigval = SivalInt Int | SivalPtr (Ptr Char) <br><br>I did a find/grep for &quot;Unacceptable argument&quot; in the ghc compiler source and assuming no typo I didn&#39;t find. ??<br>
<br>Thanks.<br><br>Kind regards, Vasili<br><br><br><br><br>
<div class="gmail_quote">
<div class="Ih2E3d">On Mon, Jun 9, 2008 at 11:25 PM, Judah Jacobson &lt;<a href="mailto:judah.jacobson@gmail.com" target="_blank">judah.jacobson@gmail.com</a>&gt; wrote:<br></div>
<div>
<div></div>
<div class="Wj3C7c">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">2008/6/9 Galchin, Vasili &lt;<a href="mailto:vigalchin@gmail.com" target="_blank">vigalchin@gmail.com</a>&gt;:<br>

<div>&gt; Ryan,<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;I tried but the compiler didn&#39;t seem to like the keyword &quot;import&quot;:<br>&gt;<br>&gt; vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell<br>&gt; Setup.lhs build<br>
&gt; Preprocessing executables for Test-1.0...<br>&gt; Building Test-1.0...<br>&gt; [1 of 1] Compiling Main &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ( ./timer.hs,<br>&gt; dist/build/timer/timer-tmp/Main.o )<br>&gt;<br>&gt; ./timer.hs:29:8: parse error on input `import&#39;<br>
&gt;<br><br></div>Hi Vasili,<br><br>To fix that error, you probably just need to add the line &quot;Extensions:<br>ForeignFunctionInterface&quot; to the .cabal file. &nbsp; (That is the<br>equivalent of calling ghc by itself with the command-line arguments<br>
-fffi or -XForeignFunctionInterface.)<br><br>Hope that helps,<br><font color="#888888">-Judah<br></font></blockquote></div></div></div><br></blockquote></div><br>