Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Documentation for the diagrams project
HTML Haskell TeX JavaScript CSS Shell
Failed to load latest commit information.
.halcyon add a working set of constraints for halcyon
HCAR replace HCAR entry with updated file
blog-old Initial pass at a blogging framework.
blog update blog post date
doc manual: write about different methods of calling backends
envelope make code sample disappear on phones and tablets
logo Fix some issues related to linear.
logs N B -> Double
notes more fixpoint design
old-example move old examples to old-example directory
papers import Monoids: Theme and Variations
release 1.3 checklist
talks finish FARM slides
web update web/Site.hs for latest pandoc & hakyll
.gitignore FARM: ignore .pdf and .tex
.mailmap start an official .mailmap file to be used for all diagrams repos
.travis.yml Add force-layout to head deps for travis
README.markdown no known issues with building via -svg
Shake.hs Merge branch 'master' of into hilbert
boring fix boring file so the manual/images and web/manual *directories* are… note need an older version of cabal HCAR: Add paragraph about Allan's GSOC use -threaded [ci skip]
diagrams-doc.cabal add .cabal file to build Shake script
misc.txt import some new files notes on release, testing with GHC 7.6, etc.


Build Status

This repository holds all documentation for the diagrams framework, including

and more.


To build the website (which includes the gallery, user manual, and tutorials), you will need:

Once you have all the dependencies, simply do

ghc --make Shake -threaded
./Shake +RTS -N4 -RTS preview

which will build the user manual and website, and run a web server on port 8000 serving a preview of the webiste. In place of -N4 you should use -NX where X is the number of cores you have. By default, the build system will use all but one of your available cores; if you wish to set the number to something else, set the DIA_DOC_THREADS environment variable.

Point your browser at localhost:8000 to view it. It works well to leave this invocation of Shake preview running, and then start another process calling Shake +RTS -NX -RTS build repeatedly in a loop. The website will now automatically be rebuilt any time any source files change.

For example, on a four-core Ubuntu machine, assuming you already have the Haskell Platform installed and want to use the rasterific backend, you could first clone the relevant diagrams repositories from github:

Then run the following commands:

sudo apt-get install python-docutils
cabal sandbox init
cabal install diagrams-core/ diagrams-solve/ diagrams-lib/ diagrams-rasterific/ diagrams-contrib/ diagrams-builder/ SVGFonts/ palette/ docutils/ shake hakyll safe
cabal exec bash
cd diagrams-doc
ghc --make Shake -threaded
./Shake +RTS -N4 -RTS preview

Building with diagrams-svg

The build system will first check for an installed diagrams-rasterific package. If none is found, it will fall back to using the diagrams-svg package. As of right now, there are no known issues with using diagrams-svg for building the website (other than the fact that some of the output .svg files are large).

Something went wrong with that request. Please try again.