The Vital GUI

A view of the Vital graphics user interface. The region in the lower half of the window is the viewport within which a Haskell document is visible.
A view of the Vital GUI displaying the structure of a DNA molecule
In this example, the user has imported two library modules, SS.hs (the stylesheet that defines the presentation of the document) and DNA_lib.hs (a collection of types and functions useful for manipulating and displaying molecules of DNA).

There are three items visible in the left half of the viewport:

  • A comment ("DNA and the Genetic Code"). The associated style of this comment (not visible here) specifies it as a "title" (and the stylesheet defines its font, size and colour).
  • A declaration, dna = parseDNA "TGATGAGCAATCGGATGC", that uses an imported function, parseDNA, to parse a string of letters representing a sequence of the four bases (abbreviated as A, C, G and T) that defines a particular DNA molecule.
  • An expression, dna. This expression is of type DNA, one of the types declared in the imported DNA_lib module. In that same module, an instance of the Edit type class specifies that:
    • values of type DNA should be displayed pictorially (rather than textually) and it provides a function (of type DNA -> Pic) to define the pictorial representation. (In this case, it displays a flattened version of the "double helix" molecule, annotated with the names of the sequence of amino acids for which the molecule codes (following recognition of the "START" codon, ATG).)
    • values of type DNA can be manipulated by point-and-click mouse operations. Here the user has selected and right-clicked on one of the base-pairs in the DNA molecule. This has dropped-down a (type-specific) menu of allowable operations which the user can carry out on that region of the molecule.

The above example is one of the interactive documents supplied with the present release. To run it, simply use the Open command to open the module named DNA.

The GUI section of the reference manual provides a detailed explanation of the GUI.


Feedback on any aspect of Vital is welcome. Written Dec 04