ghc-exactprint: ExactPrint for GHC
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
Modules
[Index] [Quick Jump]
- Language
- Haskell
- GHC
- Language.Haskell.GHC.ExactPrint
- Language.Haskell.GHC.ExactPrint.Annotate
- Language.Haskell.GHC.ExactPrint.AnnotateTypes
- Language.Haskell.GHC.ExactPrint.Annotater
- Language.Haskell.GHC.ExactPrint.Delta
- Language.Haskell.GHC.ExactPrint.GhcInterim
- Language.Haskell.GHC.ExactPrint.Lookup
- Language.Haskell.GHC.ExactPrint.Parsers
- Language.Haskell.GHC.ExactPrint.Preprocess
- Language.Haskell.GHC.ExactPrint.Pretty
- Language.Haskell.GHC.ExactPrint.Print
- Language.Haskell.GHC.ExactPrint.Transform
- Language.Haskell.GHC.ExactPrint.Types
- Language.Haskell.GHC.ExactPrint.Utils
- Language.Haskell.GHC.ExactPrint
- GHC
- Haskell
Flags
Automatic Flags
Name | Description | Default |
---|---|---|
roundtrip | Build roundtripping executables | Disabled |
dev | Development mode, do not use ghc-exactprint lib in the tests | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- ghc-exactprint-0.6.4.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.2, 0.3, 0.3.1, 0.3.1.1, 0.4.0.0, 0.4.1.0, 0.4.2.0, 0.5.0.0, 0.5.0.1, 0.5.1.0, 0.5.1.1, 0.5.2, 0.5.2.1, 0.5.3.0, 0.5.3.1, 0.5.4.0, 0.5.5.0, 0.5.6.0, 0.5.6.1, 0.5.7.0, 0.5.7.1, 0.5.8.0, 0.5.8.1, 0.5.8.2, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.3.1, 0.6.3.2, 0.6.3.3, 0.6.3.4, 0.6.4, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.4.0.1, 1.4.1, 1.5.0, 1.6.0, 1.6.1, 1.6.1.1, 1.6.1.2, 1.6.1.3, 1.7.0.0, 1.7.0.1, 1.7.1.0, 1.8.0.0, 1.9.0.0, 1.10.0.0 (info) |
---|---|
Change log | ChangeLog |
Dependencies | base (>=4.8 && <4.16), bytestring (>=0.10.6), containers (>=0.5), Diff, directory (>=1.2), fail (>=4.9 && <4.10), filemanip, filepath (>=1.4), free (>=4.12), ghc (>=7.10.2 && <9.2), ghc-boot, ghc-exactprint, ghc-paths (>=0.1), HUnit, mtl (>=2.2.1), syb (>=0.5), temporary, text (>=1.2.2), time, turtle (>=1.3.0) [details] |
Tested with | ghc ==7.10.3, ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.2, ghc ==8.4.3, ghc ==8.4.4, ghc ==8.6.1, ghc ==8.6.2, ghc ==8.6.4, ghc ==8.6.5, ghc ==8.8.1, ghc ==8.8.2, ghc ==8.8.3, ghc ==8.8.4, ghc ==8.10.1, ghc ==8.10.2, ghc ==9.0.1 |
License | BSD-3-Clause |
Author | Alan Zimmerman, Matthew Pickering |
Maintainer | alan.zimm@gmail.com |
Revised | Revision 1 made by AlanZimmerman at 2022-04-06T18:59:25Z |
Category | Development |
Source repo | head: git clone https://github.com/alanz/ghc-exactprint.git |
Uploaded | by AlanZimmerman at 2021-02-24T18:12:22Z |
Distributions | Arch:1.5.0, Debian:0.6.2, LTSHaskell:1.7.1.0, NixOS:1.7.1.0, Stackage:1.8.0.0 |
Reverse Dependencies | 19 direct, 29 indirect [details] |
Executables | prepare-hackage, static, roundtrip |
Downloads | 48571 total (475 in the last 30 days) |
Rating | 2.5 (votes: 3) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |