HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Request an account if you don't have one.

Diagrams

The diagrams library provides an embedded domain-specific language (EDSL) for creating simple pictures and diagrams in Haskell


Contents

1 Rewrite

1.1 Core DSL

1.1.1 Style

Do we either want

yellowCircle x y radius = yellowFill $ circleShape x y radius

or

drawYellowCircle x y radius = do $

   setFill yellow
   drawCircle x y radius

?

The first version allows better reuse and functional composition.

1.1.2 Elements


1.2 Modules/Extensions

1.2.1 Paths

See

1.2.2 Shapes and symbols

1.3 Input/Output

Many Haskell graphic libraries are tied to a specific rendering backend (Cairo, OpenGL, libGD etc) which makes collaboration and reuse of code and data structures very hard or impossible.

Also some dependencies are hard to fulfill. Cairo is very difficult to install on Mac OS 10.6. If you just need to generate PDF diagrams, you could choose the pure HPDF library where e.g. Hieroglyph can not be installed because of its Cairo dependence.

1.3.1 Output

1.3.2 Input

2 Inspiration

2.1 Related non-Haskell projects

2.2 Food for thought

Retrieved from "http://www.haskell.org/haskellwiki/Diagrams"

This page has been accessed 1,519 times. This page was last modified 08:50, 7 December 2009. Recent content is available under a simple permissive license.