A new foundation for refactoring - ghc-exactprint

8th October 2015 in London at CodeNode

There are 34 other SkillsCasts available from Haskell eXchange 2015

Please log in to watch this conference skillscast.

538925439 640

In this talk, I will describe the architecture and history of ghc-exactprint. ghc-exactprint is a library which enables programmers to easily specify refactoring operations by directly modifying the GHC AST. By leveraging the GHC parser and a suitable intermediate representation, we can refactor any haskell source file. I will also demonstrate two libraries which are already using ghc-exactprint to directly apply refactorings. HaRe has been rewritten to take advantage of this new machinery which has resulted in a significant reduction in complexity. Secondly, apply-refact automatically applies hlint suggestions. This program demonstrates one method in which the new foundation can be used in tandem with haskell-src-exts.

Join us at the Haskell eXchange in 2016!

Want to learn about the latest innovations in Haskell? Join 200+ Haskell and functional programmers to learn and share skills with some of the world's top Haskell experts at the Haskell eXchange 2016 in London. Find out all about Haskell's infrastructure roadmap, learn how Haskell is used in academia and enterprise and discover how Haskell is changing the way our industry tackles complex engineering problems. Early bird tickets already available!


Thanks to our sponsors

A new foundation for refactoring - ghc-exactprint

Matthew Pickering

I am a student at the University of Oxford studying Computer Science and Philosophy. I have contributed to a number of open source projects and twice participated in Google Summer of Code for Haskell.org