import Graphics.UI.FLTK import System.Exit quit = putStrLn "quit" >> exitWith ExitSuccess setTo target from = set target [label ::= get from value] main = do w <- newWindow 0 0 300 220 [ label := "myapp" ] b <- newButton 0 0 300 200 [ label := "hello world", action := const quit ] newInput 0 200 300 20 [when := wEnter, action := setTo b] run w