wxHaskell on OS X

Posted by Bill on Stack Overflow See other posts from Stack Overflow or by Bill
Published on 2010-06-12T16:47:42Z Indexed on 2010/06/12 16:52 UTC
Read the original article Hit count: 294

Filed under:
|
|

I want to use wxHaskell on OS X (Snow Leopard, MacBook Pro). I was able to install the library successfully and the script below:

module Main where
import Graphics.UI.WX

main :: IO ()
main = start hello

hello :: IO ()
hello
  = do f    <- frame    [text := "Hello!"]
       quit <- button f [text := "Quit", on command := close f]
       set f [layout := widget quit]

does result in a window being displayed with a single button, as specified. However, nothing happens when I click the button - I don't even get the visual response of the button turning blue to indicate that it's been depressed (haha, no pun intended).

I've heard that you have to run a package called "macosx-app" on wxHaskell binaries to get them to run, but I can't find this anywhere. It's not on my machine or (as far as I can tell) in the WX or wxHaskell distros.

Anyone know what I need to do to get this to work?

© Stack Overflow or respective owner

Related posts about osx

Related posts about haskell