personal-1.1.0: Personal web site for Yoo Chung
CopyrightCopyright (C) 2023 Yoo Chung
LicenseAll rights reserved
Maintainerweb@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Web.Site.Rules.Diagram

Description

Exports the rules for generating images from diagrams-based Haskell code.

Synopsis

Documentation

rules :: Rules () Source #

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.