RosettaCodeData/Task/Hello-world-Graphical/Haskell/hello-world-graphical-1.hs

14 lines
297 B
Haskell

import Graphics.UI.Gtk
import Control.Monad
messDialog = do
initGUI
dialog <- messageDialogNew Nothing [] MessageInfo ButtonsOk "Goodbye, World!"
rs <- dialogRun dialog
when (rs == ResponseOk || rs == ResponseDeleteEvent) $ widgetDestroy dialog
dialog `onDestroy` mainQuit
mainGUI