Fwd: [Haskell-cafe] FunPtr error?
Galchin, Vasili
vigalchin at gmail.com
Sun Jun 8 23:46:23 EDT 2008
So Luke .. how do I go from (Sigval -> ()), i..e notifyFunc, to FunPtr using
the suggested data constructors?
On Sun, Jun 8, 2008 at 10:01 PM, Luke Palmer <lrpalmer at gmail.com> wrote:
> 2008/6/8 Galchin, Vasili <vigalchin at gmail.com>:
> > Hello,
> >
> > I am getting what is to me a mysterious error in a test case that I
> am
> > writing:
> > vigalchin at ubuntu:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell
> > Setup.lhs build
> > Preprocessing executables for Test-1.0...
> > Building Test-1.0...
> > [1 of 1] Compiling Main ( ./timer.hs,
> > dist/build/timer/timer-tmp/Main.o )
> >
> > ./timer.hs:11:45: Not in scope: data constructor `FunPtr'
>
> There is a *type* called FunPtr in scope, but not a data constructor
> as you are using it. That is, you could say:
>
> foo :: FunPtr (Int -> IO ())
>
> That is, use the type called FunPtr, but you may not use a *function*
> called FunPtr, because it doesn't exist. You need to use functions
> like nullFunPtr, castPtrToFunPtr, etc. to construct FunPtrs.
>
> Luke
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080608/c98b9bc5/attachment.htm
More information about the Haskell-Cafe
mailing list