Movatterモバイル変換


[0]ホーム

URL:


Hackage :: [Package]

haskell-src-exts-sc:Pretty print haskell code with comments

[bsd3,language,library ] [Propose Tags ] [Report a vulnerability ]

Generate code from haskell-src-exts AST.To do it, I pretty print and parse AST, then adjust it to insert comments.


[Skip to Readme]

Modules

[Index]

Flags

Automatic Flags
NameDescriptionDefault
build-example

Build an example executable.

Disabled

Use-f <flag> to enable a flag, or-f -<flag> to disable that flag.More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No 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)
Dependenciesbase (>=4.7 && <5),haskell-src-exts (>=1.18.0),haskell-src-exts-sc [details]
LicenseBSD-3-Clause
CopyrightCopyright: (c) 2018 Artem Chirkin
AuthorArtem Chirkin
Maintainerchirkin@arch.ethz.ch
Uploadedbyachirkin at2018-04-10T14:51:25Z
Categorybsd3,library,language
Home pagehttps://github.com/achirkin/haskell-src-exts-sc#readme
Source repohead: git clonehttps://github.com/achirkin/haskell-src-exts-sc
Distributions
Reverse Dependencies1 direct, 0 indirect [details]
Executablessc-example
Downloads3720 total (16 in the last 30 days)
Rating(no votes yet)[estimated byBayesian average]
Your Rating
  • λ
  • λ
  • λ
StatusDocs available[build log]
Last success reported on 2018-04-13[all 1 reports]

Readme for haskell-src-exts-sc-0.1.0.6

[back to package description]

haskell-src-exts-sc

The library generates code fromhaskell-src-exts AST.The procedure is as follows:

  1. pretty-print AST generated byhaskell-src-exts
  2. parse the generated code to getSrcSpanInfo for each node
  3. combine AST annotated with comments and AST annotated withSrcSpanInfo
  4. insert (non-empty) comments into each node, updatingSrcSpanInfo of all nodes
  5. profit!

As 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.

Produced byhackage andCabal 3.16.1.0.


[8]ページ先頭

©2009-2026 Movatter.jp