This package is an attempt to recreate the functionality provided by the destruct command of the Merlin plugin for Vi/Emacs.
Suppose you have an ADT definition in a file. While defining a function that takes the ADT as an input, you would normally have to pattern match all the cases yourself.
The Destruct functionality of H-Atom would create all these function stubs for you.
It also works when you are working on an already existing ADT. Suppose you extended an existing ADT to add two more definitions. You would have to go through all the functions defined on that type, adding definitions for each function. But using Destruct, all you need to do is press Ctrl-Atl-o, and it will automatically add stubs for the missing clauses.
This package is not dependent on any other package.
- All functions have type definitions. Even functions not defined using 'where' or 'let'.
Currently this functionality is limited to ADTs defined within the same file that is being worked upon. Also, case statements are not supported.
- Case Statements.
- ADTs defined in other files and other modules.