Automata types are written in record syntax style, providing functions for accessing its elements. Functions are currently written in two different styles:
Using record syntax functions:
process dfa = foldl (transition dfa) (initial dfa)
Using pattern recognition:
executeNFA (NFA i _ t) = execWriterT . foldM (logNFA t) i
We should have a common code style for writing these types of functions. I think it would be better to use pattern recognition and rewrite types without using record syntax: it does not provide additional legibility since types are different and it overlaps among automata.
TL;DR: We should have a common code style for automata-related functions.
In this case, pattern recongnition is more legible than the record syntax style. The automata execution functions have been rewritten in this style in 986722b.
Automata types are written in record syntax style, providing functions for accessing its elements. Functions are currently written in two different styles:
We should have a common code style for writing these types of functions. I think it would be better to use pattern recognition and rewrite types without using record syntax: it does not provide additional legibility since types are different and it overlaps among automata.
TL;DR: We should have a common code style for automata-related functions.