I have posted to the Gtk2Hs blog about adding Text support in 0.13
http://projects.haskell.org/gtk2hs/archives/2014/07/08/planned-013-release-to-add-text-support/

Here is the content of the blog post...

I have prepared a 0.13 release that will add support for using Text (for 
functions that currently only work with String). It does this with a new 
GlibString type class that has instances for both String and Text. All the 
functions that currently use String have been changed to use this type 
class instead. This allows you to switch your code easily from String to 
Text or use a mix of the two if you wish (but not in the same function 
call as it would make for more type inference issues).

This is a breaking change (hence the bump to 0.13). If you have issues 
with existing code then it will most likely be ambiguous type errors. 
The solution will probably be one of:

 * Stick with 0.12 for now - set an upper bound in the cabal file 
   (existing code should really have a <0.13 upper bound for Gtk2Hs 
   packages already).
 * Add type signatures - to help GHC infer the type of strings you are 
   using. Leksah required the addition of around 20 type signatures.

I think the most common issue will probably be when Nothing is passed to 
a function, because GHC cannot infer the type of thisNothing. One solution 
is to change it to (Nothing :: Maybe String).

The 0.13 code is currently in the master branches of the various 
https://github.com/gtk2hs repositories. Please try it out and let us know 
if there is anything we need to address before releasing it to Hackage. 
We can still fix stuff after that, but it would be nice to know if there is 
anything major that we should address now.

Hamish
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to