Use TemplateHaskell to build the opID function
This replaces the hand-coded opID with one automatically generated from the constructor names, similar to the way Python does it, except it's done at compilation time as opposed to runtime. Again, the code line delta does not favour this patch, but this eliminates error-prone, manual code with auto-generated one; in case we add more opcode support, this will help a lot. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
Loading
Please register or sign in to comment