The dawg package

The Data.DAWG module provides fast insert and delete operations which
can be used to build the automaton on-the-fly.
Automaton from the Data.DAWG.Frozen module is ,,immutable'', but it
has lower memory footprint and provides perfect hashing functionality.