GithubHelp home page GithubHelp logo

mcwitt / haddock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haskell/haddock

0.0 2.0 0.0 15.15 MB

Haskell Documentation Tool

Home Page: www.haskell.org/haddock/

License: BSD 2-Clause "Simplified" License

Makefile 0.19% Haskell 38.07% Shell 0.06% CSS 2.58% HTML 56.21% JavaScript 0.32% TeX 0.67% TypeScript 1.91% C++ 0.01%

haddock's Introduction

Haddock CI Hackage

Haddock is the standard tool for generating documentation from Haskell code. Full documentation about Haddock itself can be found in the doc/ subdirectory, in reStructedText format format.

Project overview

This project consists of three packages:

  • haddock: provides the haddock executable. It is implemented as a tiny wrapper around haddock-api's Documentation.Haddock.haddock function.

  • haddock-api: contains the program logic of the haddock tool. The haddocks for the Documentation.Haddock module offer a good overview of the functionality.

  • haddock-library: is concerned with the parsing and processing of the Haddock markup language. Unlike the other packages, it is expected to build on a fairly wide range of GHC versions.

Contributing

Please create issues when you have any problems and pull requests if you have some code.

Hacking

To get started you'll need the latest GHC release installed.

Clone the repository:

git clone https://github.com/haskell/haddock.git
cd haddock

and then proceed using your favourite build tool.

cabal v2-build -w ghc-8.10.1
cabal v2-test -w ghc-8.10.1 all

Using stack

stack init
stack build
export HADDOCK_PATH="$(stack exec which haddock)"
stack test

Using Cabal sandboxes (deprecated)

cabal sandbox init
cabal sandbox add-source haddock-library
cabal sandbox add-source haddock-api
cabal sandbox add-source haddock-test
# adjust -j to the number of cores you want to use
cabal install -j4 --dependencies-only --enable-tests
cabal configure --enable-tests
cabal build -j4
# run the test suite
export HADDOCK_PATH="dist/build/haddock/haddock"
cabal test

Git Branches

If you're a GHC developer and want to update Haddock to work with your changes, you should be working on the ghc-head branch. See instructions at https://gitlab.haskell.org/ghc/ghc/-/wikis/working-conventions/git/submodules for an example workflow.

Updating golden testsuite outputs

If you've changed Haddock's output, you will probably need to accept the new output of Haddock's golden test suites (html-test, latex-test, hoogle-test, and hypsrc-test). This can be done by passing the --accept argument to these test suites. With a new enough version of cabal-install:

cabal v2-test html-test latex-test hoogle-test hypsrc-test \
  --test-option='--accept'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.