From HaskellWiki
< Diagrams
Revision as of 15:18, 6 February 2021 by Gwern (talk | contribs) (Reverted edits by Tomjaguarpaw (talk) to last revision by Byorgey)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

As of this writing (13 Nov 2012), the most recently released versions of diagrams (0.5.x) do not build under GHC 7.6.

If you get a message about installing transformers-, don't do it! Here's what's happening: the latest version of diagrams on Hackage says it requires base-4.5 or earlier. GHC 7.6 comes with base-4.6, so when you request to install diagrams of course cabal rejects the latest version. But here's where things go screwy: cabal then starts looking back in time to try to find an earlier version of diagrams which "works". It finds diagrams-, which is quite old and happens to be the last time that the base dependency did not have an upper bound.

However, the development versions of diagrams on github work under GHC 7.6. To build from github:

   cabal update                      # make sure you have the latest gtk2hs packages
   cabal install gtk2hs-buildtools   # if necessary
   mkdir diagrams && cd diagrams
   git clone https://github.com/diagrams/diagrams-core.git core
   git clone https://github.com/diagrams/diagrams-lib.git lib
   git clone https://github.com/diagrams/diagrams-cairo.git cairo
   git clone https://github.com/diagrams/diagrams-svg.git svg
   git clone https://github.com/diagrams/diagrams-contrib.git contrib
   cabal install core/ lib/ cairo/ svg/ contrib/  # or just pick one of {cairo,svg}