On Fri, Jan 22, 2010 at 11:23 PM, Gour <gour@gour-nitai.com> wrote:
On Fri, 22 Jan 2010 17:15:00 -0800
>>>>>> "Conal" == "Conal Elliott" wrote:

Hello Conal,

Conal> I've worked with both wxhaskell and gtk2hs.  I prefer wxhaskell
Conal> for elegant design.  And I like that it gives me a native Mac OS
Conal> X look.  There is a partially working native Gtk for Mac, but I
Conal> don't think it works with 3D, which was a requirement for me.

This is nice to hear about wxhaskell.

Conal> In spite of these reasons, I'm using gtk2hs for the time being,
Conal> because wxhaskell has a problem that makes it very unfriendly to
Conal> ghci.  The second attempt to display a GUI kills its host
Conal> process.  This behavior is okay for many (but not all) compiled
Conal> programs, but is a killer for interactive/exploratory
Conal> development.  As soon as I hear that this problem is fixed, I'll
Conal> very happily return to wxhaskell.

Isn't it that, at one point of time, gtk2hs has similar problem when
working within ghci?

I don't know gtk2hs's history.
Conal> Longer term, I want Haskell GUI programming to move away from
Conal> these massively complex OO imperative frameworks to something
Conal> much more elegant and harmonious with the spirit and benefits of
Conal> pure functional/denotative programming.

I must say that I'm looking/reading your FRP stuff from the distance
thinking it's way above the head of this Haskell noob, but I tend to
agree that it should be possible to do GUI in Haskell in a different

And not just a *different* way, but specifically a *denotative* way, i.e. in which our programs are built entirely out of pieces that have tractably precise meanings.

I'm adopting this term "denotative" from Peter Landin's seminal paper "The Next 700 Programming Languages".  See http://conal.net/blog/posts/is-haskell-a-purely-functional-language/#comment-35882 .   Previously I've been using the alternative "denotational".
Do you consider it can be achieved on the top of present libs like
wx/gtk+ or it would require writing new stuff?

I expect that even libraries like wx/gtk+ *can* be used as part of a faithful implementation of denotative GUI programming, if we take great care to insulate our denotation from the complex semantics of those libraries.  However, this insulation may be so difficult to establish and maintain that it's easier to start from scratch.

   - Conal