Neal Alexander | 18 Nov 2008 00:28
Picon
Favicon

Re: Unacceptable result type in FFI

> 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?
> 

Yea, it looks like it does honor -XForeignFunctionInterface. The 
"Monad.hs" below defines the newtypes, and haddock doesn't seem to have 
a problem with it.

> 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

Sorry, was a bad paste, i was running it through Cabal's Setup.hs.

Heres the output from running haddock directly on the two files:

------------------

$ haddock.exe -v \
	--optghc=-XGeneralizedNewtypeDeriving \
	--optghc=-DCALLCONV=ccall \
	--optghc=-XCPP
	--optghc=-XForeignFunctionInterface \
	Graphics/Rendering/OGL/GL/FlushFinish.hs

Graphics\Rendering\OGL\GL\FlushFinish.hs:39:0:
     Unacceptable result type in foreign declaration: GL ()
(Continue reading)


Gmane