This program just opens a small window displaying the message "Hello, world!". The window will look something like this (depending on your setup):
Here is the source code:
import Fudgets main = fudlogue (shellF "Hello" (labelF "Hello, world!"))
Fudgets. Assuming the Fudgets library has been
installed (with cabal install) and the program is
stored in a file called Hello.hs, the command line
to compile the program is
ghc Hello
A fudget program consists of a number of fudgets combined in a
hierarchical structure into one main fudget. The function
fudlogue
is used to connect the main fudget to the Haskell I/O system.
It also handles various initialisation and administration.
A fudget program with a graphical user interface needs one or more
shell windows (top level windows). These can be created with
the function
shellF.
The last argument is the fudget which determines the contents of the
window.
In this simple program, the contents of the shell window is just a
simple string display, which is created with the function
labelF.
The argument is the string to be displayed.