Refactoring pattern matching

  title={Refactoring pattern matching},
  author={Meng Wang and Jeremy Gibbons and Kazutaka Matsuda and Zhenjiang Hu},
  journal={Sci. Comput. Program.},
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