-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The current implementation for the combined function and enum types is getting out of hand. For each mapping (Location, Definition, etc.) using SpecValues or ValueNames two functions need to be added to SpecValue. While the current design is simple and usable it does not scale well if more mappings are added. Thus something better is needed.
A better design would probably be to add something like
data BiMap f = BiMap (f EnumValue) (f FuncValue)
and using this to recreate the current mappings (using newtypes). Furthermore the addition of data Bi b = Bi b b (or something like that) could improve some double values (like the reuses filepaths), and possibly reduce the number of explicit type signatures.
Reactions are currently unavailable