Johan Holmquist | 5 Mar 15:24 2012
Picon

GHC 7.4+ rts_evalIO and Hackage glib-0.12.2

Hi,

glib-0.12.2 on Hackage is faulty(?). It doesn't play well with GHC.7.4.

I see that this has been fixed in repository
(http://code.haskell.org/gtk2hs/glib/System/Glib/hsgclosure.c) but not
released to Hackage. Earlier references to this problem seem old now,
so I wonder what the holdup is?

cheers
/Johan Holmquist

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Christian Maeder | 12 Mar 15:01 2012
Picon

gtk-0.12.3

Hi,

"cabal install gtk" using ghc-7.4.1 fails for me as below.

"pkg-config --modversion gtk+-2.0" shows 2.20.1

I installed gtk2hs-buildtools-0.12.3 before.

How should I proceed?

Cheers Christian

[ 40 of 207] Compiling Graphics.UI.Gtk.Misc.Accessible ( 
dist/build/Graphics/UI/Gtk/Misc/Accessible.hs, 
dist/build/Graphics/UI/Gtk/Misc/Accessible.o )

Graphics/UI/Gtk/Misc/Accessible.chs:74:24:
     Not in scope: type constructor or class `AccessibleClass'
     Perhaps you meant `AccelLabelClass' (imported from 
Graphics.UI.Gtk.Types)

Graphics/UI/Gtk/Misc/Accessible.chs:79:6:
     Not in scope: `toAccessible'

Graphics/UI/Gtk/Misc/Accessible.chs:85:25:
     Not in scope: type constructor or class `AccessibleClass'
     Perhaps you meant `AccelLabelClass' (imported from 
Graphics.UI.Gtk.Types)

Graphics/UI/Gtk/Misc/Accessible.chs:91:7:
(Continue reading)

Axel Simon | 12 Mar 15:47 2012
Picon

Re: gtk-0.12.3

Hi Christian,

On 12.03.2012, at 15:01, Christian Maeder wrote:

> Hi,
>
> "cabal install gtk" using ghc-7.4.1 fails for me as below.
>
> "pkg-config --modversion gtk+-2.0" shows 2.20.1
>

Hmmm. I'm confused too. All the code in Accessible is surrounded by

#if GTK_CHECK_VERSION(2,22,0)
#endif

which must mean that the version numbers are not communicated  
correctly to ghc?!

Cheers,
Axel

> I installed gtk2hs-buildtools-0.12.3 before.
>
> How should I proceed?
>
> Cheers Christian
>
> [ 40 of 207] Compiling Graphics.UI.Gtk.Misc.Accessible (
> dist/build/Graphics/UI/Gtk/Misc/Accessible.hs,
(Continue reading)

Christian Maeder | 13 Mar 13:25 2012
Picon

Re: gtk-0.12.3

Guys,

Apologies, it's all my fault. I had an old pkg-config in my PATH (some 
time created for debugging or testing) containing:

#!/bin/sh

case $1 in
   --modversion)
      case $2 in
         gtk+-2.0)
            echo "2.20.1";;
         *) exec /usr/bin/pkg-config "$ <at> "
      esac;;
   *) exec /usr/bin/pkg-config "$ <at> "
esac

My correct "modversion" is meanwhile 2.22.1

Cheers Christian

Am 12.03.2012 15:47, schrieb Axel Simon:
> Hi Christian,
>
> On 12.03.2012, at 15:01, Christian Maeder wrote:
>
>> Hi,
>>
>> "cabal install gtk" using ghc-7.4.1 fails for me as below.
>>
(Continue reading)

Christian Maeder | 13 Mar 16:13 2012
Picon

gtk-0.12.3, glade-0.12.1, ghc-7.4.1

Hi,

I tried to switch from glade files to Gtk Builder files.
This turned out to be a nightmare. "adjustment" properties produced
"Gtk-WARNING **: No object called:". GtkSpinButton did not work.

However, installing glade always failed (see below) with:

   gtk2hsC2hs: UName: root name supply used after saving

Only after manually unpacking glade-0.12.1.tar.gz und calling "cabal 
install" twice within glade-0.12.1 eventually succeeded.

Cheers Christian

Resolving dependencies...
Downloading glade-0.12.1...
[1 of 2] Compiling SetupWrapper     ( 
/tmp/glade-0.12.111087/glade-0.12.1/SetupWrapper.hs, 
/tmp/glade-0.12.111087/glade-0.12.1/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( 
/tmp/glade-0.12.111087/glade-0.12.1/Setup.hs, 
/tmp/glade-0.12.111087/glade-0.12.1/dist/setup/Main.o )
Linking /tmp/glade-0.12.111087/glade-0.12.1/dist/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, 
dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, 
dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring glade-0.12.1...
(Continue reading)

John Lato | 13 Mar 17:06 2012
Picon

Re: GHC 7.4+ rts_evalIO and Hackage glib-0.12.2

> From: Johan Holmquist <holmisen <at> gmail.com>

> Hi,
>
> glib-0.12.2 on Hackage is faulty(?). It doesn't play well with GHC.7.4.
>
> I see that this has been fixed in repository
> (http://code.haskell.org/gtk2hs/glib/System/Glib/hsgclosure.c) but not
> released to Hackage. Earlier references to this problem seem old now,
> so I wonder what the holdup is?

glib-0.12.3, which includes this fix, is available on Hackage (did you
run "cabal update"?) although there is one issue I had when installing
it.  cabal-install seems to prefer re-using an existing glib-0.12.2
rather than pulling down the new glib-0.12.3, so to make it work I had
to do:

cabal install gio --constraint="glib == 0.12.3"
cabal install gtk --constraint="glib == 0.12.3"

Sincerely,
John L.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
(Continue reading)

wagnerdm | 13 Mar 17:43 2012

Re: GHC 7.4+ rts_evalIO and Hackage glib-0.12.2

Quoting John Lato <jwlato <at> gmail.com>:

>> From: Johan Holmquist <holmisen <at> gmail.com>
>
>> Hi,
>>
>> glib-0.12.2 on Hackage is faulty(?). It doesn't play well with GHC.7.4.
>>
>> I see that this has been fixed in repository
>> (http://code.haskell.org/gtk2hs/glib/System/Glib/hsgclosure.c) but not
>> released to Hackage. Earlier references to this problem seem old now,
>> so I wonder what the holdup is?
>
> glib-0.12.3, which includes this fix, is available on Hackage (did you
> run "cabal update"?) although there is one issue I had when installing
> it.  cabal-install seems to prefer re-using an existing glib-0.12.2
> rather than pulling down the new glib-0.12.3, so to make it work I had
> to do:
>
> cabal install gio --constraint="glib == 0.12.3"
> cabal install gtk --constraint="glib == 0.12.3"

Hm, perhaps the dependencies should be made stricter to avoid this  
kind of thing -- do you think so? I was just following the apparent  
policy of 0.12.2, which has a fairly relaxed set of dependencies.

~d

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
(Continue reading)

wagnerdm | 13 Mar 18:02 2012

Re: gtk-0.12.3, glade-0.12.1, ghc-7.4.1

Hi Christian!

Quoting Christian Maeder <Christian.Maeder <at> dfki.de>:

> I tried to switch from glade files to Gtk Builder files.
> This turned out to be a nightmare. "adjustment" properties produced
> "Gtk-WARNING **: No object called:". GtkSpinButton did not work.
>
> However, installing glade always failed (see below) with:
>
>    gtk2hsC2hs: UName: root name supply used after saving
>
> Only after manually unpacking glade-0.12.1.tar.gz und calling "cabal
> install" twice within glade-0.12.1 eventually succeeded.
>
> Cheers Christian
>
> Resolving dependencies...
> Downloading glade-0.12.1...
> [1 of 2] Compiling SetupWrapper     (
> /tmp/glade-0.12.111087/glade-0.12.1/SetupWrapper.hs,
> /tmp/glade-0.12.111087/glade-0.12.1/dist/setup/SetupWrapper.o )
> [2 of 2] Compiling Main             (
> /tmp/glade-0.12.111087/glade-0.12.1/Setup.hs,
> /tmp/glade-0.12.111087/glade-0.12.1/dist/setup/Main.o )
> Linking /tmp/glade-0.12.111087/glade-0.12.1/dist/setup/setup ...
> [1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs,
> dist/setup-wrapper/Gtk2HsSetup.o )
> [2 of 2] Compiling Main             ( SetupMain.hs,
> dist/setup-wrapper/Main.o )
(Continue reading)

Eli Frey | 14 Mar 02:29 2012
Picon

ghc 7.4.1 - more fast, more different

The latest release of GHC has some surprises.  The best news is that
it looks like FFI code runs much faster now.
Like, much much faster.

Unfortunately there's also a change that breaks the current version of Cairo.

>From the GHC 7.4.1 release notes...

> The Num class no longer has Eq or Show superclasses. A number of other
> classes and functions have therefore gained explicit Eq or Show constraints,
> rather than relying on a Num constraint to provide them.
>
> You can make code that works with both Haskell98/Haskell2010 and GHC by:
>
>* Whenever you make a Num instance of a type, also make Show and Eq instances, and
>
>* Whenever you give a function, instance or class a Num t constraint, also give it Show t and Eq t constraints.

And indeed if I try to compile with GHC 7.4.1 I get this freindly notice.

>Graphics/Rendering/Cairo/Types.chs:364:12:
>    Could not deduce (Eq a) arising from a use of `toBool'
>    from the context (Num a)
>      bound by the type signature for cToBool :: Num a => a -> Bool
>      at Graphics/Rendering/Cairo/Types.chs:364:1-17
>    Possible fix:
>      add (Eq a) to the context of
>        the type signature for cToBool :: Num a => a -> Bool
>    In the expression: toBool
>    In an equation for `cToBool': cToBool = toBool
(Continue reading)

Axel Simon | 14 Mar 08:11 2012
Picon

Re: ghc 7.4.1 - more fast, more different

Hi Eli,

this fix seems to be already in the current head! It should have been  
in the last release.

Cheers,
Axel

On 14.03.2012, at 02:29, Eli Frey wrote:

> The latest release of GHC has some surprises.  The best news is that
> it looks like FFI code runs much faster now.
> Like, much much faster.
>
> Unfortunately there's also a change that breaks the current version  
> of Cairo.
>
>> From the GHC 7.4.1 release notes...
>
>> The Num class no longer has Eq or Show superclasses. A number of  
>> other
>> classes and functions have therefore gained explicit Eq or Show  
>> constraints,
>> rather than relying on a Num constraint to provide them.
>>
>> You can make code that works with both Haskell98/Haskell2010 and  
>> GHC by:
>>
>> * Whenever you make a Num instance of a type, also make Show and Eq  
>> instances, and
(Continue reading)


Gmane