Re: Unacceptable result type in FFI
"David Waern" <[email protected]> Mon, 17 Nov 2008 22:53:28 +0100
| Newsgroups | gmane.comp.lang.haskell.haskelldoc |
|---|---|
| Message-ID | <[email protected]> |
2008/11/17 Neal Alexander <[email protected]>: > Graphics/Rendering/OGL/GL/FlushFinish.hs:39:0: > Unacceptable result type in foreign declaration: GL () > When checking declaration: > foreign import ccall unsafe "static &glFlush" flush :: GL () > > Graphics/Rendering/OGL/GL/FlushFinish.hs:47:0: > Unacceptable result type in foreign declaration: GL () > When checking declaration: > foreign import ccall unsafe "static &glFinish" finish :: GL () > haddock: Failed to check module: Graphics.Rendering.OGL.GL.FlushFinish > > ------------- > > The error message is the same as what GHC would give without > -XGeneralizedNewtypeDeriving. Hm, if you don't turn on GeneralizedNewtypeDeriving with GHC, shouldn't it fail earlier on the definition of the newtype that you are deriving things for? > full log here: > > http://hackage.haskell.org/packages/archive/OGL/0.0.0/logs/failure/ghc-6.10 > > David Waern wrote: >> >> 2008/11/16 Neal Alexander <[email protected]>: >>> >>> How do you get Haddock 2.4 to handle the return type of an FFI function >>> that >>> isnt "IO". It works automatically in the haddock version that ships with >>> ghc >>> 6.8.1. >>> >>> I tried: >>> >>> haddock --haddock-options=--optghc=-XGeneralizedNewtypeDe >>> riving You should not pass --haddock-options to haddock itself. It's used to tell Cabal which options to give to Haddock. So the right line would be: > haddock --optghc=-XGeneralizedNewtypeDeriving David