Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Org backend #1506

Open
ycpei opened this issue Jul 19, 2022 · 4 comments
Open

Org backend #1506

ycpei opened this issue Jul 19, 2022 · 4 comments

Comments

@ycpei
Copy link

ycpei commented Jul 19, 2022

Hello,

I decided to write an Org backend to Haddock, so that haskell library
documentation can be generated in Org Mode markup. Compared to the
existing backends (html, latex and hoogle), the org format is more
compact (e.g. ghc-lib-parser-9.2.2.20220307 weighs 56M in html output
vs. 10M in org), and allows utilising features like the infinite
levels of heading hierarchy, flexible folding / unfolding,
cross-package linking (by simply concatenating the output org files),
jumping to any declaration with org-goto and the endless potentials of
emacs customisation.

It seems to me most information and haskell language features one can
find displayed on hackage are supported by this org backend and
included in the output org files, though there are still some rough
edges and unsupported language features (like infix declarations and
linear types) which I aim to fix. Some example output can be found at
[2] (I will need to rename the "assets" part of the url as it is not
accurate), including base[4] and ghc-lib-parser[5] (I use it for
reference of the GHC API as it is easier to build than GHC). Another
example[6] demonstrates cross-packaging linking, where the fsd package
imports identifiers from debian and sqlite-simple, and you can follow
links from one package to another.

Given this is a fork and my changes are in haddock-api, I'm calling it
haddorg-api, for lack of a better name / approach. I'll be happy to
contribute my changes here if the different license (AGPLv3+) covering
my changes is accepted. The code is at [1] and the README at [3] has
further information.

Let me know what you think.

[1] https://g.ypei.me/haddock.git/tree/haddock-api
[2] https://ypei.org/assets/haddorg-output/
[3] https://g.ypei.me/haddock.git/tree/haddock-api/README.org
[4] https://ypei.org/assets/haddorg-output/base-4.16.1.0.org.gz
[5] https://ypei.org/assets/haddorg-output/ghc-lib-parser-9.2.2.20220307.org.gz
[6] https://ypei.org/assets/haddorg-output/fsd-sqlite-simple-debian.org.gz

@Kleidukos
Copy link
Member

Hi @ycpei, and thank you very much for haddorg. :)

The licensing is a bit tricky here, as I am not a lawyer and cannot fully comprehend the consequences of having an AGPLv3+ piece of code in an otherwise BSD-3-Clause code base.

Feel free to advertise it for our colleagues who use emacs, I'm certain that this will be popular. :)

@ycpei
Copy link
Author

ycpei commented Jul 20, 2022 via email

@coot
Copy link
Collaborator

coot commented Jul 22, 2022

The link you provided, e.g. [1] does not contain any README.md file.

@ycpei
Copy link
Author

ycpei commented Jul 24, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants