AutoForms is a library to ease the creation of Graphical User Interfaces (GUI). It does this by using generic programming to construct GUI components.

The AutoForms user creates an ordinary algebraic data type (ADT), which should reflect the data model of an application. From this ADT AutoForms automatically constructs a GUI component, by using the structure and identifiers of the ADT. To facilitate this construction, AutoForms uses the "Scrap your boilerplate" approach to generic programming.

This component can be displayed using WxHaskell or by an AutoForms custom monad called WxM.. The first facilitates that people who already knows WxHaskell quickly will be able to make GUIs. The second is our attempt at a more type-safe and easier to use GUI toolkit.

Compared to the previous example there is a few new things. First of all we need to set some compiler options, as shown at the top. Secondly, we need to use the template-Haskell function to derive an instance for the Settings-type. Thirdly, we also need to declare that the Settings-type is an instance of ECCreator.

To understand the current state it will be advantageous to know the history of AutoForms. In the beginning this library was inspired by functional forms. E.g. it was an solely an attempt to ease the construction of simple forms (like a preference dialog). Shortly after starting the project, the author discovered that a very similar approach to GUI construction had existed for some time. Namely the clean GEC library. The Clean GEC library do not only try to create forms, but tries to be useable for any kind of GUI. This inspired the author to widen AutoForms scope, by creating functionality for buttons, menus, timers, and more. We encapsulated this functionality in our own monad (WxM). The extra functionality unfortunately delayed the core of AutoForms, namely the automatic transformation of an ADT to a GUI. While this transformation is implemented, it is not as 'inteligent' as it could be.

The larger set of functionality initially proven less than perfect, as it is not as flexible as was initially hoped for. Thus, we have made fundamental changes in this version (0.4). These fundamental changes are not completely finished yet and will be the focus of the next version (0.6).