Generate code from haskell-src-exts AST.To do it, I pretty print and parse AST, then adjust it to insert comments.
| Name | Description | Default |
|---|---|---|
| build-example | Build an example executable. | Disabled |
Use-f <flag> to enable a flag, or-f -<flag> to disable that flag.More info
For package maintainers and hackage trustees
Candidates
| Versions[RSS] | 0.1.0.0,0.1.0.1,0.1.0.2,0.1.0.3,0.1.0.4,0.1.0.5,0.1.0.6 (info) |
|---|---|
| Dependencies | base (>=4.7 && <5),haskell-src-exts (>=1.18.0),haskell-src-exts-sc [details] |
| License | BSD-3-Clause |
| Copyright | Copyright: (c) 2018 Artem Chirkin |
| Author | Artem Chirkin |
| Maintainer | chirkin@arch.ethz.ch |
| Uploaded | byachirkin at2018-04-10T14:51:25Z |
| Category | bsd3,library,language |
| Home page | https://github.com/achirkin/haskell-src-exts-sc#readme |
| Source repo | head: git clonehttps://github.com/achirkin/haskell-src-exts-sc |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Executables | sc-example |
| Downloads | 3720 total (16 in the last 30 days) |
| Rating | (no votes yet)[estimated byBayesian average] |
| Your Rating |
|
| Status | Docs available[build log] Last success reported on 2018-04-13[all 1 reports] |
The library generates code fromhaskell-src-exts AST.The procedure is as follows:
haskell-src-extsSrcSpanInfo for each nodeSrcSpanInfoSrcSpanInfo of all nodesAs you can see, the algorithm is nor remarkably fast, because it prints and parses codeand modifiesSrcSpanInfo of all nodes in an AST on each comment insertion.On the good side, it is quite flexible and compatible with many versions ofhaskell-src-exts.Performance is also acceptable if you don't need to invoke it every millisecond.