{"id":22258115,"url":"https://github.com/coot/haddock-example","last_synced_at":"2025-07-04T18:08:20.301Z","repository":{"id":52666568,"uuid":"338629046","full_name":"coot/haddock-example","owner":"coot","description":"Example project with multiple package","archived":false,"fork":false,"pushed_at":"2022-05-21T13:13:20.000Z","size":5162,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"development","last_synced_at":"2025-01-30T12:13:14.666Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-13T17:28:21.000Z","updated_at":"2022-06-05T16:37:31.000Z","dependencies_parsed_at":"2022-08-22T03:21:00.681Z","dependency_job_id":null,"html_url":"https://github.com/coot/haddock-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fhaddock-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fhaddock-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fhaddock-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fhaddock-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coot","download_url":"https://codeload.github.com/coot/haddock-example/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467616,"owners_count":20620216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T08:13:32.749Z","updated_at":"2025-03-25T13:13:24.136Z","avatar_url":"https://github.com/coot.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Haddock example\n===============\n\nExample how to build haddocks for multiple cabal packages, or check the [haddock manual][haddock-manual]\n\nRequirements  \n------------\n\n* `${GHC_9}` is a path to `ghc-9.0.1``\n* `${HADDOCK}` is a path to `haddock` build from [this](https://github.com/coot/haddock/tree/coot/multiple-packages) branch (PR [#1277](https://github.com/haskell/haddock/pull/1277)).\n* You might need to add `--haddock-options: --lib PATH`, where `PATH` is a path\n  to haddocks resource directory ([haddock-api/resources](https://github.com/haskell/haddock/tree/ghc-9.0/haddock-api/resources)), also don't forget to add it to the `haddock` command below.\n\n\nBuild instructions\n------------------\n\nTo build the docs directory:\n\n```\nrm rf docs/*\ncabal haddock --with-compiler GHC_9 \\\n              --with-haddock=${HADDOCK} \\\n              --haddock-html \\\n              --haddock-quickjump \\\n              --haddock-option='--use-index=../doc-index.html' \\\n              --haddock-option='--use-contents=../index.html' \\\n              --haddock-option='--base-url=..' \\\n              all\n\ncp -r dist-newstyle/build/x86_64-linux/ghc-9.0.1/package-a-0.1.0.0/doc/html/package-a/ docs\ncp -r dist-newstyle/build/x86_64-linux/ghc-9.0.1/package-b-0.1.0.0/doc/html/package-b/ docs\n${HADDOCK} -o docs --quickjump --gen-index --gen-contents \\\n           --read-interface=package-a,docs/package-a/package-a.haddock \\\n           --read-interface=package-b,docs/package-b/package-b.haddock\n```\n\nTo include `base` documentation, copy `base` docs from `~/.ghcup/ghc/9.0.1/share/doc/ghc-9.0.1/html/librarires/base-4.15.0.0` to `docs/base` and also include `--read-interface` option:\n```\n${HADDOCK} -o docs --quickjump --gen-index --gen-contents --read-interface=package-a,docs/package-a/package-a.haddock --read-interface=package-b,docs/package-b/package-b.haddock --read-interface=base,${HOME}/.ghcup/ghc/9.0.1/share/doc/ghc-9.0.1/html/libraries/base-4.15.0.0/base.haddock\n```\n\nAnd serve `docs` with some http server, e.g. `http-server docs`.\n\n## Notes\n\n`--read-interface=PATH,...`: the `PATH` must be relative url of a package it points to (relative to `docs` directory).\n\n[haddock-manual]: https://haskell-haddock.readthedocs.io/en/latest/multi-components.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoot%2Fhaddock-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoot%2Fhaddock-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoot%2Fhaddock-example/lists"}