There seem to be two gtk2hs libraries on Hackage - gtk and gtk3. Looking at the source, they seem to share the same files and have only minor differences. How are these libraries different?
Asked
Active
Viewed 241 times
2
-
2These bind to gtk2 and gtk3 respectively. – arrowd Mar 09 '18 at 07:53
-
It is not the Haskell part that is much different. The Haskell library acts as a wrapper to the gtk library. So it calls a different one. – Willem Van Onsem Mar 09 '18 at 08:32
-
Seems that in Gtk2Hs, the 2 means "to", not "two" (like in GTK bindings *to* Haskell). The naming is infortunate as it leads to confusion. – liberforce Mar 09 '18 at 09:42
1 Answers
2
As pointed out in the comments, gtk binds to GTK+ 2, and gtk3, to GTK+ 3. One place where that information shows up is in the pkg-config
fields of their respective .cabal files (cf. gtk.cabal
and gtk3.cabal
).

duplode
- 33,731
- 7
- 79
- 150