<br><br><div class="gmail_quote"><br><br>So Luke .. how do I go from (Sigval -> ()), i..e notifyFunc, to FunPtr using the suggested data constructors? <br><br><div class="gmail_quote"><div class="Ih2E3d">On Sun, Jun 8, 2008 at 10:01 PM, Luke Palmer <<a href="mailto:lrpalmer@gmail.com" target="_blank">lrpalmer@gmail.com</a>> wrote:<br>
</div><div><div></div><div class="Wj3C7c"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2008/6/8 Galchin, Vasili <<a href="mailto:vigalchin@gmail.com" target="_blank">vigalchin@gmail.com</a>>:<br>
<div>> Hello,<br>
><br>
> I am getting what is to me a mysterious error in a test case that I am<br>
> writing:<br>
> vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell<br>
> Setup.lhs build<br>
> Preprocessing executables for Test-1.0...<br>
> Building Test-1.0...<br>
> [1 of 1] Compiling Main ( ./timer.hs,<br>
> dist/build/timer/timer-tmp/Main.o )<br>
><br>
> ./timer.hs:11:45: Not in scope: data constructor `FunPtr'<br>
<br>
</div>There is a *type* called FunPtr in scope, but not a data constructor<br>
as you are using it. That is, you could say:<br>
<br>
foo :: FunPtr (Int -> IO ())<br>
<br>
That is, use the type called FunPtr, but you may not use a *function*<br>
called FunPtr, because it doesn't exist. You need to use functions<br>
like nullFunPtr, castPtrToFunPtr, etc. to construct FunPtrs.<br>
<font color="#888888"><br>
Luke<br>
</font></blockquote></div></div></div><br>
</div><br>