-- Two widgets "talking" to each other import Graphics.UI.FLTK import System.Exit quit = putStrLn "quit" >> exitWith ExitSuccess main = do w <- newWindow 0 0 300 220 [ label := "talk" ] i <- newInput 50 50 140 30 [ label := "In"] o <- newOutput 50 100 140 30 [ label := "Out"] newButton 10 150 70 30 [ label := "C&opy", action := const (set o [value ::= get i value]) ] newButton 100 150 70 30 [ label := "&Quit", action := const quit ] run w