[Haskell-beginners] Re: Installing Gtk2hs

Colin Paul Adams colin at colina.demon.co.uk
Sun Nov 30 04:08:57 EST 2008


>>>>> "Colin" == Colin Paul Adams <colin at colina.demon.co.uk> writes:

>>>>> "Andy" == Andy Stewart <lazycat.manatee at gmail.com> writes:
    Andy> Hi, Colin, I found same problem with me.  I think gtk2hs
    Andy> can't compile success with GHC 6.10.1 So i back to 6.8

    Colin> Thanks Andy.

    Colin> I removed ghc 6.10.1 then did a yum groupinstall haskell.

    Colin> I then tried again. This time the configure failed because
    Colin> it couldn't find haddock. I had to manually add a link from
    Colin> haddock to haddock-0.9 in /usr/bin. Clearly a problem with
    Colin> the rpm packaging for Fedora.

    Colin> Now make fails with:

    Colin> svgcairo/Graphics/Rendering/Cairo/SVG.chs:201:2: Couldn't
    Colin> match expected type `()' against inferred type `CInt'
    Colin> Expected type: Render () Inferred type: Render CInt In the
    Colin> expression: liftIO $ (\ (SVG arg1) (Cairo arg2)
    -> withForeignPtr arg1
    Colin>                 $ \ argPtr1 -> rsvg_handle_render_cairo
    Colin> argPtr1 arg2) svg cr In the expression: do cr <- ask liftIO
    Colin> $ (\ (SVG arg1) (Cairo arg2)
    -> withForeignPtr arg1
    Colin>                    $ \ argPtr1 -> rsvg_handle_render_cairo
    Colin> argPtr1 arg2) svg cr make[1]: ***
    Colin> [svgcairo/Graphics/Rendering/Cairo/SVG.o] Error 1 make: ***
    Colin> [all] Error 2

So I tried changing Render () to Render CInt in four places in
SVG.chs.

Now it installs OK with 6.8.3, and all the demos run.

I'd have a go at getting it to work with 6.10.1 if I knew what to do.
It appears the library structure has changed incompatibly (and ghc
didn't even change its version number - that's pretty bad). Is there a
document anywhere that details the structure changes?
-- 
Colin Adams
Preston Lancashire


More information about the Beginners mailing list