Copyright | Copyright (C) 2023 Yoo Chung |
---|---|
License | All rights reserved |
Maintainer | web@chungyc.org |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Exports the rules for generating images from diagrams-based Haskell code.
Synopsis
- rules :: Rules ()
Documentation
Rules related to images generated from Haskell code based on diagrams.
The Haskell code will typically import the Diagrams.Runner module
for the putDiagram
helper function.
The generated image will be in SVG format.
For example, Haskell code generating an image could look like this:
import Diagrams.Runner main :: IO () main = putDiagram defaultOptions roundThing roundThing :: Diagram B roundThing = circle 1 # lc red
If this code is in the file site/diagrams/round.hs
,
this will generate the file /diagrams/round.svg
for the site.