Diagrams [000S]
- October 28, 2025
Diagrams is an embedded domain-specific language in Haskell for creating vector graphics, which I and several other contributors developed starting in 2008. Development has more or less stopped at this point, but I still keep it updated to compile with the latest versions of GHC and its dependencies.
Diagrams-related talks and papers
- October 28, 2025
Reference. Diagrams: A Functional EDSL for Vector Graphics [yates-yorgey-2015]
Diagrams is a domain-specific language for creating vector graphics. We will give a short diagrams tutorial/demo, particularly highlighting the power of a functional, embedded domain-specific language.
@inproceedings{yates-yorgey-2015,
author = {Yates, Ryan and Yorgey, Brent A.},
title = {Diagrams: a functional EDSL for vector graphics},
year = {2015},
isbn = {9781450338066},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/2808083.2808085},
doi = {10.1145/2808083.2808085},
abstract = {},
booktitle = {Proceedings of the 3rd ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design},
pages = {4–5},
numpages = {2},
keywords = {EDSL, Haskell, diagrams, vector},
location = {Vancouver, BC, Canada},
series = {FARM 2015}
}Reference. Diagrams: Declarative Vector Graphics in Haskell [yorgey-diagrams-NYHUG-2013]
- November 20, 2013
- Brent A. Yorgey
- New York Haskell Users' Group
- Slides
- Video
Reference. Functional Active Animation [yorgey-active-2013]
Reference. Monoids: Theme and Variations (Functional Pearl) [yorgey-monoids-2012]
The monoid is a humble algebraic structure, at first glance even downright boring. However, there's much more to monoids than meets the eye. Using examples taken from the diagrams vector graphics framework as a case study, I demonstrate the power and beauty of monoids for library design. The paper begins with an extremely simple model of diagrams and proceeds through a series of incremental variations, all related somehow to the central theme of monoids. Along the way, I illustrate the power of compositional semantics; why you should also pay attention to the monoid's even humbler cousin, the semigroup; monoid homomorphisms; and monoid actions.
@inproceedings{10.1145/2364506.2364520,
author = {Yorgey, Brent A.},
title = {Monoids: Theme and Variations (Functional Pearl)},
year = {2012},
isbn = {978-1-4503-1574-6},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/2364506.2364520},
doi = {10.1145/2364506.2364520},
booktitle = {Proceedings of the 2012 Haskell Symposium},
pages = {105--116},
numpages = {12},
keywords = {monoid action, monoid, homomorphism, edsl},
location = {Copenhagen, Denmark},
series = {Haskell '12}
}Reference. Embedded, functional, compositional drawing [yorgey-compositional-drawing-2012]
- April 13, 2012
- Brent A. Yorgey
- Williams College