Refactoring pattern matching

@article{Wang2013RefactoringPM,
  title={Refactoring pattern matching},
  author={Meng Wang and Jeremy Gibbons and Kazutaka Matsuda and Zhenjiang Hu},
  journal={Sci. Comput. Program.},
  year={2013},
  volume={78},
  pages={2216-2242}
}
Defining functions by pattern matching over the arguments is advantageous for understanding and reasoning, but it tends to expose the implementation of a datatype. Significant effort has been invested in tackling this loss of modularity; however, decoupling patterns from concrete representations while maintaining soundness of reasoning has been a challenge. Inspired by the development of invertible programming, we propose an approach to program refactoring based on a right-invertible language… CONTINUE READING