Closed SAdams601 closed 7 years ago
Once travis gives it green I will merge.
And then I think it will be time for a release. Awesome.
I've pushed fixing everything except for the issue with merging anns. I'm going to have to take a closer look and see how I want to rewrite everything.
Ok. This is more a journey than something absolute.
This pull request includes two new refactorings and multiple other library changes.
The new refactorings are, delete a definition and generalise monad to applicative.
Delete a definition will remove some top level definition from a file.
Generalise monad to applicative will rewrite a do block using the applicative operators. For more information about how that works see the following pdf of a paper currently in review for publication in IFL 2016.
ifl2016.pdf
I have added three new utility modules Language.Haskell.Refact.Utils(Synonyms, Transform, and Query).
Synonyms simply exports type synonyms of certain parsed GHC AST types.
Query is a module that contains functions that retrieve parts of the AST and check preconditions on AST chunks.
Transform is a module of fairly high level rewriting functions. It's common to want to do things like wrap an AST chunk in parenthesis and Transform has a function that handles both the AST and annotation changes required to do this.
I have also added several other functions to existing utility modules.