This program just opens a small window displaying the message "Hello, world!" and a Quit button. The window will look something like this (depending on your setup):
Here is the source code:
import AllFudgets main = fudlogue (shellF "Hello" (labelF "Hello, world!" >+< quitButtonF))
This program is a small extension of the previous one. We have replaced
(labelF "Hello, world!")
with
(labelF "Hello, world!" >+< quitButtonF)
The operator
>+<
is parallel composition
of fudgets (see the circuit diagram in the
manual page).
The fudget quitButtonF is a button which quits the program when pressed.
The automatic layout system chose to use a vertical composition of the two parts in this user interface.
The window manager usually provides a quit button in the window frame or something equivalent, so there is usually no need to put an extra quit button in the program.