I want a datatype to represent a finite set of integers that can be addressed by specific names. I figure the best way to do that is to use an Enum.
However, there is o
Since you say the numbers are not generated by any regular law, you could use generic programming (e.g. with Scrap Your Boilerplate) or Template Haskell to implement a generic solution to this problem. I tend to prefer Template Haskell because it actually generates code and compiles it, so you get all the type-checking and optimisation benefits of GHC.
I wouldn't be surprised if someone had implemented this already. It should be trivial.