elm-generic-dict elm-generic-dict can be used to codegen dictionaries with arbitrary types as keys. It is meant to be used as a library with elm-codegen.
The dictionaries don't contain functions, and the API (of the generated code) doesn't require you to pass any function.
The main disadvantage of using this approach is code duplication, while the advantages are: