@hackage ghc-exactprint0.6.4
ExactPrint for GHC
Categories
License
BSD-3-Clause
Maintainer
alan.zimm@gmail.com
Links
Versions
Installation
Tested Compilers
Dependencies (12)
- base >=4.8 && <4.16
- bytestring >=0.10.6
- containers >=0.5
- directory >=1.2
- fail >=4.9 && <4.10
- filepath >=1.4 Show all…
Dependents (26)
@hackage/hls-hlint-plugin, @hackage/smuggler2, @hackage/smuggler, @hackage/hgrep, @hackage/hls-refactor-plugin, @hackage/auto-extract, Show all…
Package Flags
roundtrip
(off by default)
Build roundtripping executables
dev
(off by default)
Development mode, do not use ghc-exactprint lib in the tests
Using the API Annotations available from GHC 7.10.2, this library provides a means to round trip any code that can be compiled by GHC, currently excluding lhs files.
It does this with a phased approach
Delta - converts GHC API Annotations into relative offsets, indexed by SrcSpan
Transform - functions to facilitate changes to the AST, adjusting the annotations generated in the Delta phase to suit the changes.
Print - converts an AST and its annotations to properly formatted source text.
Pretty - adds annotations to an AST (fragment) so that the output can be parsed back to the same AST.
Note: requires GHC 7.10.2 or later