Refactoring Functional Programs

  • Simon Thompson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3622)


Refactoring is the process of improving the design of existing programs without changing their functionality. These notes cover refactoring in functional languages, using Haskell as the medium, and introducing the HaRe tool for refactoring in Haskell.


Pattern Match Functional Program Program Transformation Proof Assistant Abstract Syntax Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Burton, W., et al.: Views: An Extension to Haskell Pattern Matching. Proposed extension to Haskell,
  2. 2.
    The BlueJ system,
  3. 3.
    Brandt, J., Roberts, D.: Refactory,
  4. 4.
    Diatchki, I.S., Jones, M.P., Hallgren, T.: A Formal Specification for the Haskell 98 Module System. In: ACM Sigplan Haskell Workshop (2002)Google Scholar
  5. 5.
    The Eclipse project,
  6. 6.
    Erwig, M., Ren, D.: Monadification of functional programs. Science of Computer Programming 52(1-3), 101–129 (2004)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Floyd, R.W.: The paradigms of programming. Commun. ACM 22(8), 455–460 (1979)CrossRefGoogle Scholar
  8. 8.
    Fowler, M.: Refactoring: Improving the Design of Existing Code. Object Technology Series. Addison-Wesley, Reading (2000)Google Scholar
  9. 9.
    Griswold, W.G., Notkin, D.: Automated assistance for program restructuring. ACM Transactions on Software Engineering and Methodology 2 (1993)Google Scholar
  10. 10.
    The Haddock documentation system for Haskell,
  11. 11.
    Hallgren, T.: Haskell Tools from the Programatica Project (Demo Abstract). In: ACM Sigplan Haskell Workshop (2003)Google Scholar
  12. 12.
  13. 13.
    Lämmel, R.: Reuse by Program Transformation. In: Michaelson, G., Trinder, P. (eds.) Functional Programming Trends 1999 (2000) (intellect); Selected papers from the 1st Scottish Functional Programming WorkshopGoogle Scholar
  14. 14.
    Liang, S., Hudak, P., Jones, M.: Monad transformers and modular interpreters. In: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Francisco, California. ACM Press, New York (1995)Google Scholar
  15. 15.
    Lämmel, R., Jones, S.P.: Scrap your boilerplate: a practical design pattern for generic programming. In: Proceedings of the Workshop on Types in Language Design and Implementation. ACM, New York (2003)Google Scholar
  16. 16.
    Lämmel, R., Jones, S.P.: Scrap more boilerplate: reflection, zips, and generalised casts. In: Proceedings of International Conference on Functional Programming 2004. ACM Press, New York (2004)Google Scholar
  17. 17.
    Li, H., Reinke, C., Thompson, S.: Tool Support for Refactoring Functional Programs. In: ACM Sigplan Haskell Workshop (2003)Google Scholar
  18. 18.
    Li, H., Reinke, C., Thompson, S.: Progress on HaRe: the Haskell Refactorer. Poster presentation at the International Conference on Functional Programming, Snowbird, Utah. ACM, New York (2004)Google Scholar
  19. 19.
    Lämmel, R., Visser, J.: Generic Programming with Strafunski (2001),
  20. 20.
    Viet, C.N.: Transformation in HaRe. Technical report, Computing Laboratory, University of Kent (2004),
  21. 21.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL: A Proof assistant for Higher-Order Logic. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  22. 22.
    Opdyke, W.F.: Refactoring Object-Oriented Frameworks. PhD thesis, University of Illinois at Urbana-Champaign (1992)Google Scholar
  23. 23.
    Russell, D.J.: FAD: Functional Analysis and Design Methodology. PhD thesis, University of Kent (2000)Google Scholar
  24. 24.
    Tennent, R.D.: Principles of Programming Languages. Prentice Hall, Englewood Cliffs (1979)Google Scholar
  25. 25.
  26. 26.
    Thompson, S., Reinke, C.: A Case Study in Refactoring Functional Programs. In: Brazilian Symposium on Programming Languages (2003)Google Scholar
  27. 27.
    The Unified Modeling Language,
  28. 28.
    Wadler, P.: Views: a way for pattern-matching to cohabit with data abstraction. In: Proceedings of 14th ACM Symposium on Principles of Programming Languages, January 1987. ACM Press, New York (1987) (revised March 1987)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Simon Thompson
    • 1
  1. 1.Computing LaboratoryUniversity of KentCanterburyUnited Kingdom

Personalised recommendations