[Haskell-cafe] FunPtr error?

Galchin, Vasili vigalchin at gmail.com
Sun Jun 8 22:17:14 EDT 2008


     I am getting what is to me a mysterious error in a test case that I am
vigalchin at ubuntu:~/FTP/Haskell/unix-$ 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'

It seems like the compiler is complaining about the lack of FunPtr in it's
symbol table but System.Posix is imported:

module Main where

import System.Posix
import Foreign
import Foreign.C
import Foreign.Ptr

main = do

         let event = Sigevent{sigevFunction=(FunPtr
(notifyFunc))}                    <<<<<< error here

         timerId <- timerCreate Clock_Realtime Nothing

         timerDelete timerId

         return ()

notifyFunc :: Sigval -> IO ()
notifyFunc sigval = do
   putStrLn "timer POP!!!!!!!"
   return ()

I am probably looking right at the answer and not seeing it. ??

Thanks, Vasili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080608/631fd843/attachment.htm

More information about the Haskell-Cafe mailing list