[Haskell-cafe] FunPtr error?
lrpalmer at gmail.com
Sun Jun 8 23:01:03 EDT 2008
2008/6/8 Galchin, Vasili <vigalchin at gmail.com>:
> I am getting what is to me a mysterious error in a test case that I am
> vigalchin at ubuntu:~/FTP/Haskell/unix-18.104.22.168/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.
More information about the Haskell-Cafe